Skip to content

Commit

Permalink
removes support for ws1 from aura
Browse files Browse the repository at this point in the history
This removes ScreenProvider, WindowManagerClient and most of the
WindowManager interface as they are not needed. Additionally this cleans up
a couple of functions in WindowTree.

Doing this showed a couple of test failures in aura. I'm making them early out
for now and will investigate after this. The failures are because previously
even though mus was configured some tests created WindowTreeHostPlatform, when
I changed that to WindowTreeHostMus the tests started failing.

BUG=865689,842365
TEST=none

Change-Id: Id5a67d7f513b2015a46a75745593ba122d17f6df
Reviewed-on: https://chromium-review.googlesource.com/1146336
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577370}
  • Loading branch information
Scott Violet authored and Commit Bot committed Jul 24, 2018
1 parent a603fbb commit fd9a3b6
Show file tree
Hide file tree
Showing 87 changed files with 373 additions and 4,177 deletions.
4 changes: 0 additions & 4 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ component("ash") {
"drag_drop/drag_drop_tracker.h",
"drag_drop/drag_image_view.cc",
"drag_drop/drag_image_view.h",
"event_matcher_util.cc",
"event_matcher_util.h",
"events/event_rewriter_controller.cc",
"events/event_rewriter_controller.h",
"events/keyboard_driven_event_rewriter.cc",
Expand Down Expand Up @@ -308,8 +306,6 @@ component("ash") {
"host/ash_window_tree_host_mirroring_delegate.h",
"host/ash_window_tree_host_mirroring_unified.cc",
"host/ash_window_tree_host_mirroring_unified.h",
"host/ash_window_tree_host_mus.cc",
"host/ash_window_tree_host_mus.h",
"host/ash_window_tree_host_platform.cc",
"host/ash_window_tree_host_platform.h",
"host/ash_window_tree_host_unified.cc",
Expand Down
3 changes: 2 additions & 1 deletion ash/ash_service_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "base/run_loop.h"
#include "services/service_manager/public/cpp/service_test.h"
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "services/ui/public/interfaces/window_tree.mojom.h"
#include "services/ui/public/interfaces/window_tree_constants.mojom.h"
#include "ui/aura/env.h"
Expand Down Expand Up @@ -137,7 +138,7 @@ TEST_F(AshServiceTest, MAYBE_OpenWindow) {
std::unique_ptr<aura::WindowTreeClient> child_client =
aura::WindowTreeClient::CreateForEmbedding(
connector(), &window_tree_delegate, std::move(tree_client_request),
false, aura::WindowTreeClient::Config::kMus2);
false);
window_tree_delegate.WaitForEmbed();
ASSERT_TRUE(!child_client->GetRoots().empty());
window_tree_delegate.DestroyWindowTreeHost();
Expand Down
1 change: 1 addition & 0 deletions ash/components/autoclick/autoclick_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/constants.mojom.h"
#include "services/ui/public/interfaces/event_injector.mojom.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "services/ui/public/interfaces/window_tree_constants.mojom.h"
#include "ui/aura/mus/property_converter.h"
#include "ui/base/ui_base_types.h"
Expand Down
1 change: 1 addition & 0 deletions ash/components/tap_visualizer/tap_visualizer_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "services/service_manager/public/cpp/service_context.h"
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "services/ui/public/interfaces/window_tree_constants.mojom.h"
#include "ui/aura/mus/property_converter.h"
#include "ui/display/display.h"
Expand Down
45 changes: 13 additions & 32 deletions ash/display/mirror_window_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,19 @@ void MirrorWindowController::UpdateWindow(
host_info->ash_host->SetRootWindowTransformer(std::move(transformer));
mirror_window->SetBounds(host->window()->bounds());
mirror_window->Show();
// The classic config creates the accelerated widget synchronously. Mus
// (without viz) creates the reflector in OnAcceleratedWidgetOverridden.
if (host->GetAcceleratedWidget() != gfx::kNullAcceleratedWidget) {
DCHECK_EQ(Shell::GetAshConfig(), Config::CLASSIC);
if (reflector_) {
reflector_->AddMirroringLayer(mirror_window->layer());
} else if (aura::Env::GetInstance()->context_factory_private()) {
reflector_ =
aura::Env::GetInstance()
->context_factory_private()
->CreateReflector(
Shell::GetRootWindowForDisplayId(reflecting_source_id_)
->GetHost()
->compositor(),
mirror_window->layer());
}
// The accelerated widget is created synchronously.
DCHECK_NE(gfx::kNullAcceleratedWidget, host->GetAcceleratedWidget());
if (reflector_) {
reflector_->AddMirroringLayer(mirror_window->layer());
} else if (aura::Env::GetInstance()->context_factory_private()) {
reflector_ =
aura::Env::GetInstance()
->context_factory_private()
->CreateReflector(
Shell::GetRootWindowForDisplayId(reflecting_source_id_)
->GetHost()
->compositor(),
mirror_window->layer());
}
} else {
AshWindowTreeHost* ash_host =
Expand Down Expand Up @@ -334,22 +331,6 @@ void MirrorWindowController::OnHostResized(aura::WindowTreeHost* host) {
}
}

void MirrorWindowController::OnAcceleratedWidgetOverridden(
aura::WindowTreeHost* host) {
DCHECK_NE(host->GetAcceleratedWidget(), gfx::kNullAcceleratedWidget);
DCHECK_NE(Shell::GetAshConfig(), Config::CLASSIC);
DCHECK(!base::FeatureList::IsEnabled(features::kMashDeprecated));
MirroringHostInfo* info = mirroring_host_info_map_[host->GetDisplayId()];
if (reflector_) {
reflector_->AddMirroringLayer(info->mirror_window->layer());
} else if (aura::Env::GetInstance()->context_factory_private()) {
reflector_ =
aura::Env::GetInstance()->context_factory_private()->CreateReflector(
Shell::GetPrimaryRootWindow()->GetHost()->compositor(),
info->mirror_window->layer());
}
}

display::Display MirrorWindowController::GetDisplayForRootWindow(
const aura::Window* root) const {
for (const auto& pair : mirroring_host_info_map_) {
Expand Down
1 change: 0 additions & 1 deletion ash/display/mirror_window_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class ASH_EXPORT MirrorWindowController

// aura::WindowTreeHostObserver overrides:
void OnHostResized(aura::WindowTreeHost* host) override;
void OnAcceleratedWidgetOverridden(aura::WindowTreeHost* host) override;

// Returns the display::Display for the mirroring root window.
display::Display GetDisplayForRootWindow(const aura::Window* root) const;
Expand Down
60 changes: 0 additions & 60 deletions ash/event_matcher_util.cc

This file was deleted.

33 changes: 0 additions & 33 deletions ash/event_matcher_util.h

This file was deleted.

2 changes: 0 additions & 2 deletions ash/frame/detached_title_area_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ DetachedTitleAreaRendererForClient::DetachedTitleAreaRendererForClient(
CreateInitParams("DetachedTitleAreaRendererForClient");
views::NativeWidgetAura* native_widget =
new views::NativeWidgetAura(widget_, true);
native_widget->GetNativeView()->SetProperty(
aura::client::kEmbedType, aura::client::WindowEmbedType::TOP_LEVEL_IN_WM);
aura::SetWindowType(native_widget->GetNativeWindow(),
ui::mojom::WindowType::POPUP);
ApplyProperties(native_widget->GetNativeWindow(), property_converter,
Expand Down
130 changes: 0 additions & 130 deletions ash/host/ash_window_tree_host_mus.cc

This file was deleted.

Loading

0 comments on commit fd9a3b6

Please sign in to comment.