summaryrefslogtreecommitdiffstats
path: root/mash/wm
diff options
context:
space:
mode:
Diffstat (limited to 'mash/wm')
-rw-r--r--mash/wm/accelerator_registrar_apptest.cc2
-rw-r--r--mash/wm/non_client_frame_controller.cc8
-rw-r--r--mash/wm/non_client_frame_controller.h4
-rw-r--r--mash/wm/root_window_controller.cc10
-rw-r--r--mash/wm/root_window_controller.h4
-rw-r--r--mash/wm/window_manager.cc2
-rw-r--r--mash/wm/window_manager_application.cc14
-rw-r--r--mash/wm/window_manager_application.h6
-rw-r--r--mash/wm/window_manager_apptest.cc4
9 files changed, 27 insertions, 27 deletions
diff --git a/mash/wm/accelerator_registrar_apptest.cc b/mash/wm/accelerator_registrar_apptest.cc
index f7c31ae..a16d210 100644
--- a/mash/wm/accelerator_registrar_apptest.cc
+++ b/mash/wm/accelerator_registrar_apptest.cc
@@ -72,7 +72,7 @@ class AcceleratorRegistrarTest : public mojo::test::ApplicationTestBase {
protected:
void ConnectToRegistrar(AcceleratorRegistrarPtr* registrar) {
- shell()->ConnectToInterface("mojo:desktop_wm", registrar);
+ connector()->ConnectToInterface("mojo:desktop_wm", registrar);
}
private:
diff --git a/mash/wm/non_client_frame_controller.cc b/mash/wm/non_client_frame_controller.cc
index b35741f..ed6ad3a 100644
--- a/mash/wm/non_client_frame_controller.cc
+++ b/mash/wm/non_client_frame_controller.cc
@@ -90,9 +90,9 @@ class ContentWindowLayoutManager : public aura::LayoutManager {
class WmNativeWidgetMus : public views::NativeWidgetMus {
public:
WmNativeWidgetMus(views::internal::NativeWidgetDelegate* delegate,
- mojo::Shell* shell,
+ mojo::Connector* connector,
mus::Window* window)
- : NativeWidgetMus(delegate, shell, window,
+ : NativeWidgetMus(delegate, connector, window,
mus::mojom::SurfaceType::UNDERLAY) {}
~WmNativeWidgetMus() override {
}
@@ -166,7 +166,7 @@ class ClientViewMus : public views::ClientView {
} // namespace
NonClientFrameController::NonClientFrameController(
- mojo::Shell* shell,
+ mojo::Connector* connector,
mus::Window* window,
mus::WindowManagerClient* window_manager_client)
: widget_(new views::Widget), window_(window) {
@@ -176,7 +176,7 @@ NonClientFrameController::NonClientFrameController(
// We initiate focus at the mus level, not at the views level.
params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
params.delegate = this;
- params.native_widget = new WmNativeWidgetMus(widget_, shell, window);
+ params.native_widget = new WmNativeWidgetMus(widget_, connector, window);
widget_->Init(params);
widget_->ShowInactive();
diff --git a/mash/wm/non_client_frame_controller.h b/mash/wm/non_client_frame_controller.h
index b5346f2..c43cf73 100644
--- a/mash/wm/non_client_frame_controller.h
+++ b/mash/wm/non_client_frame_controller.h
@@ -17,7 +17,7 @@ class Insets;
}
namespace mojo {
-class Shell;
+class Connector;
}
namespace mus {
@@ -33,7 +33,7 @@ class NonClientFrameController : public views::WidgetDelegateView,
public mus::WindowObserver {
public:
// NonClientFrameController deletes itself when |window| is destroyed.
- NonClientFrameController(mojo::Shell* shell,
+ NonClientFrameController(mojo::Connector* connector,
mus::Window* window,
mus::WindowManagerClient* window_manager_client);
diff --git a/mash/wm/root_window_controller.cc b/mash/wm/root_window_controller.cc
index d46cd78..03de79e 100644
--- a/mash/wm/root_window_controller.cc
+++ b/mash/wm/root_window_controller.cc
@@ -21,7 +21,7 @@
#include "mash/wm/window_layout.h"
#include "mash/wm/window_manager.h"
#include "mash/wm/window_manager_application.h"
-#include "mojo/shell/public/cpp/shell.h"
+#include "mojo/shell/public/cpp/connector.h"
namespace mash {
namespace wm {
@@ -39,7 +39,7 @@ void AssertTrue(bool success) {
RootWindowController* RootWindowController::CreateUsingWindowTreeHost(
WindowManagerApplication* app) {
RootWindowController* controller = new RootWindowController(app);
- mus::CreateWindowTreeHost(app->shell(), controller,
+ mus::CreateWindowTreeHost(app->connector(), controller,
&controller->window_tree_host_,
controller->window_manager_.get());
return controller;
@@ -69,8 +69,8 @@ void RootWindowController::Destroy() {
}
}
-mojo::Shell* RootWindowController::GetShell() {
- return app_->shell();
+mojo::Connector* RootWindowController::GetConnector() {
+ return app_->connector();
}
mus::Window* RootWindowController::GetWindowForContainer(
@@ -145,7 +145,7 @@ void RootWindowController::OnEmbed(mus::Window* root) {
AddAccelerators();
mash::shell::mojom::ShellPtr shell;
- app_->shell()->ConnectToInterface("mojo:mash_shell", &shell);
+ app_->connector()->ConnectToInterface("mojo:mash_shell", &shell);
window_manager_->Initialize(this, std::move(shell));
shadow_controller_.reset(new ShadowController(root->connection()));
diff --git a/mash/wm/root_window_controller.h b/mash/wm/root_window_controller.h
index 623b2e1..d254da5 100644
--- a/mash/wm/root_window_controller.h
+++ b/mash/wm/root_window_controller.h
@@ -13,7 +13,7 @@
#include "mojo/public/cpp/bindings/binding.h"
namespace mojo {
-class Shell;
+class Connector;
}
namespace mus {
@@ -45,7 +45,7 @@ class RootWindowController : public mus::WindowObserver,
// Deletes this.
void Destroy();
- mojo::Shell* GetShell();
+ mojo::Connector* GetConnector();
mus::Window* root() { return root_; }
diff --git a/mash/wm/window_manager.cc b/mash/wm/window_manager.cc
index d5b28a8..f57af0a 100644
--- a/mash/wm/window_manager.cc
+++ b/mash/wm/window_manager.cc
@@ -113,7 +113,7 @@ mus::Window* WindowManager::NewTopLevelWindow(
if (provide_non_client_frame) {
// NonClientFrameController deletes itself when |window| is destroyed.
- new NonClientFrameController(root_controller_->GetShell(), window,
+ new NonClientFrameController(root_controller_->GetConnector(), window,
root_controller_->window_manager_client());
}
diff --git a/mash/wm/window_manager_application.cc b/mash/wm/window_manager_application.cc
index f02f613..5f5089a 100644
--- a/mash/wm/window_manager_application.cc
+++ b/mash/wm/window_manager_application.cc
@@ -16,7 +16,7 @@
#include "mash/wm/user_window_controller_impl.h"
#include "mojo/services/tracing/public/cpp/tracing_impl.h"
#include "mojo/shell/public/cpp/connection.h"
-#include "mojo/shell/public/cpp/shell.h"
+#include "mojo/shell/public/cpp/connector.h"
#include "ui/mojo/init/ui_init.h"
#include "ui/views/mus/aura_init.h"
#include "ui/views/mus/display_converter.h"
@@ -25,7 +25,7 @@ namespace mash {
namespace wm {
WindowManagerApplication::WindowManagerApplication()
- : shell_(nullptr), window_manager_factory_binding_(this) {}
+ : connector_(nullptr), window_manager_factory_binding_(this) {}
WindowManagerApplication::~WindowManagerApplication() {
// AcceleratorRegistrarImpl removes an observer in its destructor. Destroy
@@ -56,7 +56,7 @@ void WindowManagerApplication::OnRootWindowControllerGotRoot(
ui_init_.reset(new ui::mojo::UIInit(
views::GetDisplaysFromWindow(root_controller->root())));
- aura_init_.reset(new views::AuraInit(shell_, "mash_wm_resources.pak"));
+ aura_init_.reset(new views::AuraInit(connector_, "mash_wm_resources.pak"));
}
void WindowManagerApplication::OnRootWindowControllerDoneInit(
@@ -103,15 +103,15 @@ void WindowManagerApplication::OnAcceleratorRegistrarDestroyed(
accelerator_registrars_.erase(registrar);
}
-void WindowManagerApplication::Initialize(mojo::Shell* shell,
+void WindowManagerApplication::Initialize(mojo::Connector* connector,
const std::string& url,
uint32_t id,
uint32_t user_id) {
- shell_ = shell;
- tracing_.Initialize(shell, url);
+ connector_ = connector;
+ tracing_.Initialize(connector, url);
mus::mojom::WindowManagerFactoryServicePtr wm_factory_service;
- shell_->ConnectToInterface("mojo:mus", &wm_factory_service);
+ connector_->ConnectToInterface("mojo:mus", &wm_factory_service);
wm_factory_service->SetWindowManagerFactory(
window_manager_factory_binding_.CreateInterfacePtrAndBind());
diff --git a/mash/wm/window_manager_application.h b/mash/wm/window_manager_application.h
index 7f2806f..a716990 100644
--- a/mash/wm/window_manager_application.h
+++ b/mash/wm/window_manager_application.h
@@ -50,7 +50,7 @@ class WindowManagerApplication
WindowManagerApplication();
~WindowManagerApplication() override;
- mojo::Shell* shell() { return shell_; }
+ mojo::Connector* connector() { return connector_; }
// Returns the RootWindowControllers that have valid roots.
//
@@ -78,7 +78,7 @@ class WindowManagerApplication
void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar);
// mojo::ShellClient:
- void Initialize(mojo::Shell* shell, const std::string& url,
+ void Initialize(mojo::Connector* connector, const std::string& url,
uint32_t id, uint32_t user_id) override;
bool AcceptConnection(mojo::Connection* connection) override;
@@ -97,7 +97,7 @@ class WindowManagerApplication
mojo::InterfaceRequest<mus::mojom::WindowTreeClient>
client_request) override;
- mojo::Shell* shell_;
+ mojo::Connector* connector_;
mojo::TracingImpl tracing_;
diff --git a/mash/wm/window_manager_apptest.cc b/mash/wm/window_manager_apptest.cc
index 6e6e9fb..7ea0a25 100644
--- a/mash/wm/window_manager_apptest.cc
+++ b/mash/wm/window_manager_apptest.cc
@@ -39,12 +39,12 @@ TEST_F(WindowManagerAppTest, OpenWindow) {
WindowTreeDelegateImpl window_tree_delegate;
// Bring up the the desktop_wm.
- shell()->Connect("mojo:desktop_wm");
+ connector()->Connect("mojo:desktop_wm");
// Connect to mus and create a new top level window. The request goes to
// the |desktop_wm|, but is async.
scoped_ptr<mus::WindowTreeConnection> connection(
- mus::WindowTreeConnection::Create(&window_tree_delegate, shell()));
+ mus::WindowTreeConnection::Create(&window_tree_delegate, connector()));
mus::Window* top_level_window = connection->NewTopLevelWindow(nullptr);
ASSERT_TRUE(top_level_window);
mus::Window* child_window = connection->NewWindow();