diff options
author | ben <ben@chromium.org> | 2016-02-06 20:35:30 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-07 04:36:48 +0000 |
commit | 3a7cbe0bed9f9b81ab1da4ed0e4dba764345977e (patch) | |
tree | de412bbb84e68778685e868f2b62d873ffa2937d /components/mus | |
parent | d345759c314c478c2b35f5ae6e6fd0698e532d2a (diff) | |
download | chromium_src-3a7cbe0bed9f9b81ab1da4ed0e4dba764345977e.zip chromium_src-3a7cbe0bed9f9b81ab1da4ed0e4dba764345977e.tar.gz chromium_src-3a7cbe0bed9f9b81ab1da4ed0e4dba764345977e.tar.bz2 |
Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead.
Also eliminates use of mojo::shell::mojom::Shell in favor of this base interface.
This means most code doesn't have to use ApplicationImpl - only the places that instantiate them.
TBR=rockot@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1674903003
Cr-Commit-Position: refs/heads/master@{#374049}
Diffstat (limited to 'components/mus')
-rw-r--r-- | components/mus/mus_app.cc | 18 | ||||
-rw-r--r-- | components/mus/mus_app.h | 7 | ||||
-rw-r--r-- | components/mus/public/cpp/lib/window_tree_client_impl.cc | 13 | ||||
-rw-r--r-- | components/mus/public/cpp/lib/window_tree_client_impl.h | 2 | ||||
-rw-r--r-- | components/mus/public/cpp/lib/window_tree_host_factory.cc | 6 | ||||
-rw-r--r-- | components/mus/public/cpp/tests/window_server_test_base.cc | 4 | ||||
-rw-r--r-- | components/mus/public/cpp/window_tree_connection.h | 4 | ||||
-rw-r--r-- | components/mus/public/cpp/window_tree_host_factory.h | 6 | ||||
-rw-r--r-- | components/mus/ws/display_manager.cc | 17 | ||||
-rw-r--r-- | components/mus/ws/display_manager.h | 8 | ||||
-rw-r--r-- | components/mus/ws/display_manager_factory.h | 4 | ||||
-rw-r--r-- | components/mus/ws/window_manager_client_apptest.cc | 5 | ||||
-rw-r--r-- | components/mus/ws/window_tree_apptest.cc | 21 | ||||
-rw-r--r-- | components/mus/ws/window_tree_host_impl.cc | 4 | ||||
-rw-r--r-- | components/mus/ws/window_tree_host_impl.h | 2 | ||||
-rw-r--r-- | components/mus/ws/window_tree_unittest.cc | 3 |
16 files changed, 56 insertions, 68 deletions
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc index 0035075..b7ffa4d 100644 --- a/components/mus/mus_app.cc +++ b/components/mus/mus_app.cc @@ -17,8 +17,7 @@ #include "mojo/public/c/system/main.h" #include "mojo/services/tracing/public/cpp/tracing_impl.h" #include "mojo/shell/public/cpp/application_connection.h" -#include "mojo/shell/public/cpp/application_impl.h" -#include "mojo/shell/public/cpp/application_runner.h" +#include "mojo/shell/public/cpp/shell.h" #include "ui/events/event_switches.h" #include "ui/events/platform/platform_event_source.h" #include "ui/gl/gl_surface.h" @@ -32,7 +31,6 @@ #endif using mojo::ApplicationConnection; -using mojo::ApplicationImpl; using mojo::InterfaceRequest; using mus::mojom::WindowTreeHostFactory; using mus::mojom::Gpu; @@ -46,7 +44,7 @@ struct MandolineUIServicesApp::PendingRequest { }; MandolineUIServicesApp::MandolineUIServicesApp() - : app_impl_(nullptr) {} + : shell_(nullptr) {} MandolineUIServicesApp::~MandolineUIServicesApp() { if (gpu_state_) @@ -55,8 +53,10 @@ MandolineUIServicesApp::~MandolineUIServicesApp() { connection_manager_.reset(); } -void MandolineUIServicesApp::Initialize(ApplicationImpl* app) { - app_impl_ = app; +void MandolineUIServicesApp::Initialize(mojo::Shell* shell, + const std::string& url, + uint32_t id) { + shell_ = shell; surfaces_state_ = new SurfacesState; #if defined(USE_X11) @@ -87,7 +87,7 @@ void MandolineUIServicesApp::Initialize(ApplicationImpl* app) { gpu_state_ = new GpuState(hardware_rendering_available); connection_manager_.reset(new ws::ConnectionManager(this, surfaces_state_)); - tracing_.Initialize(app); + tracing_.Initialize(shell, url); } bool MandolineUIServicesApp::AcceptConnection( @@ -112,7 +112,7 @@ void MandolineUIServicesApp::OnFirstRootConnectionCreated() { } void MandolineUIServicesApp::OnNoMoreRootConnections() { - app_impl_->Quit(); + shell_->Quit(); } ws::ClientConnection* @@ -186,7 +186,7 @@ void MandolineUIServicesApp::CreateWindowTreeHost( // TODO(fsamuel): We need to make sure that only the window manager can create // new roots. ws::WindowTreeHostImpl* host_impl = new ws::WindowTreeHostImpl( - connection_manager_.get(), app_impl_, gpu_state_, surfaces_state_); + connection_manager_.get(), shell_, gpu_state_, surfaces_state_); // WindowTreeHostConnection manages its own lifetime. host_impl->Init(new ws::WindowTreeHostConnectionImpl( diff --git a/components/mus/mus_app.h b/components/mus/mus_app.h index e300602..920e668 100644 --- a/components/mus/mus_app.h +++ b/components/mus/mus_app.h @@ -24,7 +24,7 @@ #include "mojo/shell/public/cpp/interface_factory.h" namespace mojo { -class ApplicationImpl; +class Shell; } namespace ui { @@ -61,7 +61,8 @@ class MandolineUIServicesApp struct PendingRequest; // ApplicationDelegate: - void Initialize(mojo::ApplicationImpl* app) override; + void Initialize(mojo::Shell* shell, const std::string& url, + uint32_t id) override; bool AcceptConnection( mojo::ApplicationConnection* connection) override; @@ -103,7 +104,7 @@ class MandolineUIServicesApp mojom::WindowTreeClientPtr tree_client) override; mojo::WeakBindingSet<mojom::WindowTreeHostFactory> factory_bindings_; - mojo::ApplicationImpl* app_impl_; + mojo::Shell* shell_; scoped_ptr<ws::ConnectionManager> connection_manager_; scoped_refptr<GpuState> gpu_state_; scoped_ptr<ui::PlatformEventSource> event_source_; diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc index 93ad772..afda349 100644 --- a/components/mus/public/cpp/lib/window_tree_client_impl.cc +++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc @@ -19,10 +19,7 @@ #include "components/mus/public/cpp/window_tree_connection_observer.h" #include "components/mus/public/cpp/window_tree_delegate.h" #include "mojo/converters/geometry/geometry_type_converters.h" -#include "mojo/shell/public/cpp/application_impl.h" -#include "mojo/shell/public/cpp/connect.h" -#include "mojo/shell/public/cpp/service_provider_impl.h" -#include "mojo/shell/public/interfaces/service_provider.mojom.h" +#include "mojo/shell/public/cpp/shell.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/size.h" @@ -83,10 +80,10 @@ Window* BuildWindowTree(WindowTreeClientImpl* client, } WindowTreeConnection* WindowTreeConnection::Create(WindowTreeDelegate* delegate, - mojo::ApplicationImpl* app) { + mojo::Shell* shell) { WindowTreeClientImpl* client = new WindowTreeClientImpl(delegate, nullptr, nullptr); - client->ConnectViaWindowTreeFactory(app); + client->ConnectViaWindowTreeFactory(shell); return client; } @@ -161,7 +158,7 @@ WindowTreeClientImpl::~WindowTreeClientImpl() { } void WindowTreeClientImpl::ConnectViaWindowTreeFactory( - mojo::ApplicationImpl* app) { + mojo::Shell* shell) { // Clients created with no root shouldn't delete automatically. delete_on_no_roots_ = false; @@ -169,7 +166,7 @@ void WindowTreeClientImpl::ConnectViaWindowTreeFactory( connection_id_ = 101; mojom::WindowTreeFactoryPtr factory; - app->ConnectToService("mojo:mus", &factory); + shell->ConnectToService("mojo:mus", &factory); factory->CreateWindowTree(GetProxy(&tree_ptr_), binding_.CreateInterfacePtrAndBind()); tree_ = tree_ptr_.get(); diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.h b/components/mus/public/cpp/lib/window_tree_client_impl.h index 9898541..681dbff 100644 --- a/components/mus/public/cpp/lib/window_tree_client_impl.h +++ b/components/mus/public/cpp/lib/window_tree_client_impl.h @@ -45,7 +45,7 @@ class WindowTreeClientImpl : public WindowTreeConnection, ~WindowTreeClientImpl() override; // Establishes the connection by way of the WindowTreeFactory. - void ConnectViaWindowTreeFactory(mojo::ApplicationImpl* app); + void ConnectViaWindowTreeFactory(mojo::Shell* shell); // Wait for OnEmbed(), returning when done. void WaitForEmbed(); diff --git a/components/mus/public/cpp/lib/window_tree_host_factory.cc b/components/mus/public/cpp/lib/window_tree_host_factory.cc index 77cf6de..a475686 100644 --- a/components/mus/public/cpp/lib/window_tree_host_factory.cc +++ b/components/mus/public/cpp/lib/window_tree_host_factory.cc @@ -6,7 +6,7 @@ #include "components/mus/public/cpp/window_tree_connection.h" #include "components/mus/public/cpp/window_tree_delegate.h" -#include "mojo/shell/public/cpp/application_impl.h" +#include "mojo/shell/public/cpp/shell.h" namespace mus { @@ -22,12 +22,12 @@ void CreateWindowTreeHost(mojom::WindowTreeHostFactory* factory, factory->CreateWindowTreeHost(GetProxy(host), std::move(tree_client)); } -void CreateWindowTreeHost(mojo::ApplicationImpl* app, +void CreateWindowTreeHost(mojo::Shell* shell, WindowTreeDelegate* delegate, mojom::WindowTreeHostPtr* host, WindowManagerDelegate* window_manager_delegate) { mojom::WindowTreeHostFactoryPtr factory; - app->ConnectToService("mojo:mus", &factory); + shell->ConnectToService("mojo:mus", &factory); CreateWindowTreeHost(factory.get(), delegate, host, window_manager_delegate); } diff --git a/components/mus/public/cpp/tests/window_server_test_base.cc b/components/mus/public/cpp/tests/window_server_test_base.cc index 29dbd82..636e4f7 100644 --- a/components/mus/public/cpp/tests/window_server_test_base.cc +++ b/components/mus/public/cpp/tests/window_server_test_base.cc @@ -11,7 +11,7 @@ #include "components/mus/public/cpp/window.h" #include "components/mus/public/cpp/window_tree_connection.h" #include "components/mus/public/cpp/window_tree_host_factory.h" -#include "mojo/shell/public/cpp/application_impl.h" +#include "mojo/shell/public/cpp/shell.h" namespace mus { namespace { @@ -65,7 +65,7 @@ bool WindowServerTestBase::QuitRunLoop() { void WindowServerTestBase::SetUp() { ApplicationTestBase::SetUp(); - CreateWindowTreeHost(application_impl(), this, &host_, this); + CreateWindowTreeHost(shell(), this, &host_, this); ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed(). std::swap(window_manager_, most_recent_connection_); diff --git a/components/mus/public/cpp/window_tree_connection.h b/components/mus/public/cpp/window_tree_connection.h index bd1519b..da5b06f 100644 --- a/components/mus/public/cpp/window_tree_connection.h +++ b/components/mus/public/cpp/window_tree_connection.h @@ -16,7 +16,7 @@ #include "mojo/public/cpp/bindings/interface_request.h" namespace mojo { -class ApplicationImpl; +class Shell; } namespace mus { @@ -43,7 +43,7 @@ class WindowTreeConnection { // Creates a WindowTreeConnection with no roots. Use this to establish a // connection directly to mus and create top level windows. static WindowTreeConnection* Create(WindowTreeDelegate* delegate, - mojo::ApplicationImpl* app); + mojo::Shell* shell); // Creates a WindowTreeConnection to service the specified request for // a WindowTreeClient. Use this to be embedded in another app. diff --git a/components/mus/public/cpp/window_tree_host_factory.h b/components/mus/public/cpp/window_tree_host_factory.h index c466074..1c75de8 100644 --- a/components/mus/public/cpp/window_tree_host_factory.h +++ b/components/mus/public/cpp/window_tree_host_factory.h @@ -11,7 +11,7 @@ #include "mojo/public/cpp/bindings/binding.h" namespace mojo { -class ApplicationImpl; +class Shell; } namespace mus { @@ -20,13 +20,13 @@ class WindowManagerDelegate; class WindowTreeDelegate; // The following create a new window tree host. Supply a |factory| if you have -// already connected to mus, otherwise supply |app|, which contacts mus and +// already connected to mus, otherwise supply |shell|, which contacts mus and // obtains a WindowTreeHostFactory. void CreateWindowTreeHost(mojom::WindowTreeHostFactory* factory, WindowTreeDelegate* delegate, mojom::WindowTreeHostPtr* host, WindowManagerDelegate* window_manager_delegate); -void CreateWindowTreeHost(mojo::ApplicationImpl* app, +void CreateWindowTreeHost(mojo::Shell* shell, WindowTreeDelegate* delegate, mojom::WindowTreeHostPtr* host, WindowManagerDelegate* window_manager_delegate); diff --git a/components/mus/ws/display_manager.cc b/components/mus/ws/display_manager.cc index 205a6506..dea7a83 100644 --- a/components/mus/ws/display_manager.cc +++ b/components/mus/ws/display_manager.cc @@ -28,7 +28,7 @@ #include "mojo/converters/surfaces/surfaces_utils.h" #include "mojo/converters/transform/transform_type_converters.h" #include "mojo/shell/public/cpp/application_connection.h" -#include "mojo/shell/public/cpp/application_impl.h" +#include "mojo/shell/public/cpp/shell.h" #include "third_party/skia/include/core/SkXfermode.h" #include "ui/base/cursor/cursor_loader.h" #include "ui/events/event.h" @@ -154,22 +154,19 @@ DisplayManagerFactory* DisplayManager::factory_ = nullptr; // static DisplayManager* DisplayManager::Create( - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<SurfacesState>& surfaces_state) { - if (factory_) { - return factory_->CreateDisplayManager(app_impl, gpu_state, - surfaces_state); - } - return new DefaultDisplayManager(app_impl, gpu_state, - surfaces_state); + if (factory_) + return factory_->CreateDisplayManager(shell, gpu_state, surfaces_state); + return new DefaultDisplayManager(shell, gpu_state, surfaces_state); } DefaultDisplayManager::DefaultDisplayManager( - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<SurfacesState>& surfaces_state) - : app_impl_(app_impl), + : shell_(shell), gpu_state_(gpu_state), surfaces_state_(surfaces_state), delegate_(nullptr), diff --git a/components/mus/ws/display_manager.h b/components/mus/ws/display_manager.h index be2c3130..cd23a03 100644 --- a/components/mus/ws/display_manager.h +++ b/components/mus/ws/display_manager.h @@ -33,7 +33,7 @@ class GpuState; } // namespace gles2 namespace mojo { -class ApplicationImpl; +class Shell; } // namespace mojo namespace ui { @@ -61,7 +61,7 @@ class DisplayManager { virtual ~DisplayManager() {} static DisplayManager* Create( - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<SurfacesState>& surfaces_state); @@ -103,7 +103,7 @@ class DisplayManager { class DefaultDisplayManager : public DisplayManager, public ui::PlatformWindowDelegate { public: - DefaultDisplayManager(mojo::ApplicationImpl* app_impl, + DefaultDisplayManager(mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<SurfacesState>& surfaces_state); ~DefaultDisplayManager() override; @@ -149,7 +149,7 @@ class DefaultDisplayManager : public DisplayManager, void OnAcceleratedWidgetDestroyed() override; void OnActivationChanged(bool active) override; - mojo::ApplicationImpl* app_impl_; + mojo::Shell* shell_; scoped_refptr<GpuState> gpu_state_; scoped_refptr<SurfacesState> surfaces_state_; DisplayManagerDelegate* delegate_; diff --git a/components/mus/ws/display_manager_factory.h b/components/mus/ws/display_manager_factory.h index 2067a27..49bc734 100644 --- a/components/mus/ws/display_manager_factory.h +++ b/components/mus/ws/display_manager_factory.h @@ -9,7 +9,7 @@ #include "mojo/public/cpp/bindings/callback.h" namespace mojo { -class ApplicationImpl; +class Shell; } namespace mus { @@ -23,7 +23,7 @@ class DisplayManager; class DisplayManagerFactory { public: virtual DisplayManager* CreateDisplayManager( - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<mus::GpuState>& gpu_state, const scoped_refptr<mus::SurfacesState>& surfaces_state) = 0; }; diff --git a/components/mus/ws/window_manager_client_apptest.cc b/components/mus/ws/window_manager_client_apptest.cc index df8fcdc..2312d72 100644 --- a/components/mus/ws/window_manager_client_apptest.cc +++ b/components/mus/ws/window_manager_client_apptest.cc @@ -17,7 +17,6 @@ #include "components/mus/public/cpp/window_tree_delegate.h" #include "mojo/converters/geometry/geometry_type_converters.h" #include "mojo/shell/public/cpp/application_connection.h" -#include "mojo/shell/public/cpp/application_impl.h" #include "mojo/shell/public/cpp/application_test_base.h" #include "ui/gfx/geometry/rect.h" #include "ui/mojo/geometry/geometry_util.h" @@ -278,7 +277,7 @@ class WindowServerTest : public WindowServerTestBase { mus::mojom::WindowTreeClientPtr ConnectToApplicationAndGetWindowServerClient() { mus::mojom::WindowTreeClientPtr client; - application_impl()->ConnectToService(application_impl()->url(), &client); + shell()->ConnectToService(shell_url(), &client); return client; } @@ -1156,7 +1155,7 @@ TEST_F(WindowServerTest, EstablishConnectionViaFactory) { EstablishConnectionViaFactoryDelegate delegate(window_manager()); set_window_manager_delegate(&delegate); scoped_ptr<WindowTreeConnection> second_connection( - WindowTreeConnection::Create(this, application_impl())); + WindowTreeConnection::Create(this, shell())); Window* window_in_second_connection = second_connection->NewTopLevelWindow(nullptr); ASSERT_TRUE(window_in_second_connection); diff --git a/components/mus/ws/window_tree_apptest.cc b/components/mus/ws/window_tree_apptest.cc index b51ac8a..8237e58 100644 --- a/components/mus/ws/window_tree_apptest.cc +++ b/components/mus/ws/window_tree_apptest.cc @@ -17,7 +17,6 @@ #include "mojo/converters/geometry/geometry_type_converters.h" #include "mojo/public/cpp/bindings/associated_binding.h" #include "mojo/shell/public/cpp/application_delegate.h" -#include "mojo/shell/public/cpp/application_impl.h" #include "mojo/shell/public/cpp/application_test_base.h" using mojo::ApplicationConnection; @@ -65,7 +64,7 @@ void EmbedCallbackImpl(base::RunLoop* run_loop, // ----------------------------------------------------------------------------- -bool EmbedUrl(mojo::ApplicationImpl* app, +bool EmbedUrl(mojo::Shell* shell, WindowTree* ws, const String& url, Id root_id) { @@ -73,7 +72,7 @@ bool EmbedUrl(mojo::ApplicationImpl* app, base::RunLoop run_loop; { mojom::WindowTreeClientPtr client; - app->ConnectToService(url.get(), &client); + shell->ConnectToService(url.get(), &client); ws->Embed(root_id, std::move(client), mojom::WindowTree::kAccessPolicyDefault, base::Bind(&EmbedCallbackImpl, &run_loop, &result)); @@ -542,8 +541,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase, Id root_id, uint32_t policy_bitmask, int* connection_id) { - if (!EmbedUrl(application_impl(), owner, application_impl()->url(), - root_id)) { + if (!EmbedUrl(shell(), owner, shell_url(), root_id)) { ADD_FAILURE() << "Embed() failed"; return nullptr; } @@ -569,7 +567,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase, client_factory_.reset(new WindowTreeClientFactory()); mojom::WindowTreeHostFactoryPtr factory; - application_impl()->ConnectToService("mojo:mus", &factory); + shell()->ConnectToService("mojo:mus", &factory); mojom::WindowTreeClientPtr tree_client_ptr; ws_client1_.reset(new TestWindowTreeClientImpl()); @@ -1720,8 +1718,7 @@ TEST_F(WindowTreeAppTest, EmbedFailsFromOtherConnection) { // 2 should not be able to embed in window_3_3 as window_3_3 was not created // by // 2. - EXPECT_FALSE(EmbedUrl(application_impl(), ws2(), application_impl()->url(), - window_3_3)); + EXPECT_FALSE(EmbedUrl(shell(), ws2(), shell_url(), window_3_3)); } // Verifies Embed() from window manager on another connections window works. @@ -1744,8 +1741,7 @@ TEST_F(WindowTreeAppTest, EmbedFromOtherConnection) { TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) { // Shouldn't be able to embed into the root. - ASSERT_FALSE(EmbedUrl(application_impl(), ws1(), application_impl()->url(), - root_window_id())); + ASSERT_FALSE(EmbedUrl(shell(), ws1(), shell_url(), root_window_id())); // Even though the call above failed a WindowTreeClient was obtained. We need // to @@ -1754,7 +1750,7 @@ TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) { // Don't allow a connection to embed into its own root. ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); - EXPECT_FALSE(EmbedUrl(application_impl(), ws2(), application_impl()->url(), + EXPECT_FALSE(EmbedUrl(shell(), ws2(), shell_url(), BuildWindowId(connection_id_1(), 1))); // Need to wait for a WindowTreeClient for same reason as above. @@ -1771,8 +1767,7 @@ TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) { // window_1_2 is ws3's root, so even though v3 is an embed root it should not // be able to Embed into itself. - ASSERT_FALSE(EmbedUrl(application_impl(), ws3(), application_impl()->url(), - window_1_2)); + ASSERT_FALSE(EmbedUrl(shell(), ws3(), shell_url(), window_1_2)); } // Verifies that a transient window tracks its parent's lifetime. diff --git a/components/mus/ws/window_tree_host_impl.cc b/components/mus/ws/window_tree_host_impl.cc index 885750a..d75b184 100644 --- a/components/mus/ws/window_tree_host_impl.cc +++ b/components/mus/ws/window_tree_host_impl.cc @@ -87,7 +87,7 @@ WindowTreeHostImpl::QueuedEvent::~QueuedEvent() {} WindowTreeHostImpl::WindowTreeHostImpl( ConnectionManager* connection_manager, - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<SurfacesState>& surfaces_state) : id_(next_id++), @@ -95,7 +95,7 @@ WindowTreeHostImpl::WindowTreeHostImpl( connection_manager_(connection_manager), event_dispatcher_(this), display_manager_( - DisplayManager::Create(app_impl, gpu_state, surfaces_state)), + DisplayManager::Create(shell, gpu_state, surfaces_state)), tree_awaiting_input_ack_(nullptr), last_cursor_(0) { frame_decoration_values_ = mojom::FrameDecorationValues::New(); diff --git a/components/mus/ws/window_tree_host_impl.h b/components/mus/ws/window_tree_host_impl.h index f20524a..e4e2bc2 100644 --- a/components/mus/ws/window_tree_host_impl.h +++ b/components/mus/ws/window_tree_host_impl.h @@ -48,7 +48,7 @@ class WindowTreeHostImpl : public DisplayManagerDelegate, // DisplayManagers. We should probably just store these common parameters // in the DisplayManagerFactory and pass them along on DisplayManager::Create. WindowTreeHostImpl(ConnectionManager* connection_manager, - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<SurfacesState>& surfaces_state); ~WindowTreeHostImpl() override; diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc index 739ffe0..bf16547 100644 --- a/components/mus/ws/window_tree_unittest.cc +++ b/components/mus/ws/window_tree_unittest.cc @@ -27,7 +27,6 @@ #include "components/mus/ws/window_tree_impl.h" #include "mojo/converters/geometry/geometry_type_converters.h" #include "mojo/services/network/public/interfaces/url_loader.mojom.h" -#include "mojo/shell/public/interfaces/service_provider.mojom.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/events/event.h" #include "ui/events/event_utils.h" @@ -347,7 +346,7 @@ class TestDisplayManagerFactory : public DisplayManagerFactory { : cursor_id_storage_(cursor_id_storage) {} ~TestDisplayManagerFactory() {} DisplayManager* CreateDisplayManager( - mojo::ApplicationImpl* app_impl, + mojo::Shell* shell, const scoped_refptr<GpuState>& gpu_state, const scoped_refptr<mus::SurfacesState>& surfaces_state) override { return new TestDisplayManager(cursor_id_storage_); |