summaryrefslogtreecommitdiffstats
path: root/components/mus/ws
diff options
context:
space:
mode:
Diffstat (limited to 'components/mus/ws')
-rw-r--r--components/mus/ws/display_manager.cc12
-rw-r--r--components/mus/ws/display_manager.h8
-rw-r--r--components/mus/ws/display_manager_factory.h4
-rw-r--r--components/mus/ws/window_manager_client_apptest.cc4
-rw-r--r--components/mus/ws/window_tree_apptest.cc16
-rw-r--r--components/mus/ws/window_tree_host_impl.cc4
-rw-r--r--components/mus/ws/window_tree_host_impl.h2
-rw-r--r--components/mus/ws/window_tree_unittest.cc2
8 files changed, 26 insertions, 26 deletions
diff --git a/components/mus/ws/display_manager.cc b/components/mus/ws/display_manager.cc
index a35e08b..8b991f8 100644
--- a/components/mus/ws/display_manager.cc
+++ b/components/mus/ws/display_manager.cc
@@ -29,7 +29,7 @@
#include "mojo/converters/surfaces/surfaces_utils.h"
#include "mojo/converters/transform/transform_type_converters.h"
#include "mojo/shell/public/cpp/connection.h"
-#include "mojo/shell/public/cpp/shell.h"
+#include "mojo/shell/public/cpp/connector.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/base/cursor/cursor_loader.h"
#include "ui/events/event.h"
@@ -155,19 +155,19 @@ DisplayManagerFactory* DisplayManager::factory_ = nullptr;
// static
DisplayManager* DisplayManager::Create(
- mojo::Shell* shell,
+ mojo::Connector* connector,
const scoped_refptr<GpuState>& gpu_state,
const scoped_refptr<SurfacesState>& surfaces_state) {
if (factory_)
- return factory_->CreateDisplayManager(shell, gpu_state, surfaces_state);
- return new DefaultDisplayManager(shell, gpu_state, surfaces_state);
+ return factory_->CreateDisplayManager(connector, gpu_state, surfaces_state);
+ return new DefaultDisplayManager(connector, gpu_state, surfaces_state);
}
DefaultDisplayManager::DefaultDisplayManager(
- mojo::Shell* shell,
+ mojo::Connector* connector,
const scoped_refptr<GpuState>& gpu_state,
const scoped_refptr<SurfacesState>& surfaces_state)
- : shell_(shell),
+ : connector_(connector),
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 49a1f92..ce93485 100644
--- a/components/mus/ws/display_manager.h
+++ b/components/mus/ws/display_manager.h
@@ -35,7 +35,7 @@ class GpuState;
} // namespace gles2
namespace mojo {
-class Shell;
+class Connector;
} // namespace mojo
namespace ui {
@@ -63,7 +63,7 @@ class DisplayManager {
virtual ~DisplayManager() {}
static DisplayManager* Create(
- mojo::Shell* shell,
+ mojo::Connector* connector,
const scoped_refptr<GpuState>& gpu_state,
const scoped_refptr<SurfacesState>& surfaces_state);
@@ -112,7 +112,7 @@ class DisplayManager {
class DefaultDisplayManager : public DisplayManager,
public ui::PlatformWindowDelegate {
public:
- DefaultDisplayManager(mojo::Shell* shell,
+ DefaultDisplayManager(mojo::Connector* connector,
const scoped_refptr<GpuState>& gpu_state,
const scoped_refptr<SurfacesState>& surfaces_state);
~DefaultDisplayManager() override;
@@ -162,7 +162,7 @@ class DefaultDisplayManager : public DisplayManager,
void OnAcceleratedWidgetDestroyed() override;
void OnActivationChanged(bool active) override;
- mojo::Shell* shell_;
+ mojo::Connector* connector_;
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 49bc734..f73ac80 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 Shell;
+class Connector;
}
namespace mus {
@@ -23,7 +23,7 @@ class DisplayManager;
class DisplayManagerFactory {
public:
virtual DisplayManager* CreateDisplayManager(
- mojo::Shell* shell,
+ mojo::Connector* connector,
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 5d9f111..8bc7972 100644
--- a/components/mus/ws/window_manager_client_apptest.cc
+++ b/components/mus/ws/window_manager_client_apptest.cc
@@ -275,7 +275,7 @@ class WindowServerTest : public WindowServerTestBase {
// WindowTreeClient.
mus::mojom::WindowTreeClientPtr ConnectAndGetWindowServerClient() {
mus::mojom::WindowTreeClientPtr client;
- shell()->ConnectToInterface(shell_url(), &client);
+ connector()->ConnectToInterface(test_url(), &client);
return client;
}
@@ -1159,7 +1159,7 @@ TEST_F(WindowServerTest, EstablishConnectionViaFactory) {
EstablishConnectionViaFactoryDelegate delegate(window_manager());
set_window_manager_delegate(&delegate);
scoped_ptr<WindowTreeConnection> second_connection(
- WindowTreeConnection::Create(this, shell()));
+ WindowTreeConnection::Create(this, connector()));
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 ee2a186..cc18e0d 100644
--- a/components/mus/ws/window_tree_apptest.cc
+++ b/components/mus/ws/window_tree_apptest.cc
@@ -63,7 +63,7 @@ void EmbedCallbackImpl(base::RunLoop* run_loop,
// -----------------------------------------------------------------------------
-bool EmbedUrl(mojo::Shell* shell,
+bool EmbedUrl(mojo::Connector* connector,
WindowTree* ws,
const String& url,
Id root_id) {
@@ -71,7 +71,7 @@ bool EmbedUrl(mojo::Shell* shell,
base::RunLoop run_loop;
{
mojom::WindowTreeClientPtr client;
- shell->ConnectToInterface(url.get(), &client);
+ connector->ConnectToInterface(url.get(), &client);
ws->Embed(root_id, std::move(client),
mojom::WindowTree::kAccessPolicyDefault,
base::Bind(&EmbedCallbackImpl, &run_loop, &result));
@@ -547,7 +547,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase,
Id root_id,
uint32_t policy_bitmask,
int* connection_id) {
- if (!EmbedUrl(shell(), owner, shell_url(), root_id)) {
+ if (!EmbedUrl(connector(), owner, test_url(), root_id)) {
ADD_FAILURE() << "Embed() failed";
return nullptr;
}
@@ -573,7 +573,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase,
client_factory_.reset(new WindowTreeClientFactory());
mojom::WindowTreeHostFactoryPtr factory;
- shell()->ConnectToInterface("mojo:mus", &factory);
+ connector()->ConnectToInterface("mojo:mus", &factory);
mojom::WindowTreeClientPtr tree_client_ptr;
ws_client1_.reset(new TestWindowTreeClientImpl());
@@ -1724,7 +1724,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(shell(), ws2(), shell_url(), window_3_3));
+ EXPECT_FALSE(EmbedUrl(connector(), ws2(), test_url(), window_3_3));
}
// Verifies Embed() from window manager on another connections window works.
@@ -1747,7 +1747,7 @@ TEST_F(WindowTreeAppTest, EmbedFromOtherConnection) {
TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) {
// Shouldn't be able to embed into the root.
- ASSERT_FALSE(EmbedUrl(shell(), ws1(), shell_url(), root_window_id()));
+ ASSERT_FALSE(EmbedUrl(connector(), ws1(), test_url(), root_window_id()));
// Even though the call above failed a WindowTreeClient was obtained. We need
// to
@@ -1756,7 +1756,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(shell(), ws2(), shell_url(),
+ EXPECT_FALSE(EmbedUrl(connector(), ws2(), test_url(),
BuildWindowId(connection_id_1(), 1)));
// Need to wait for a WindowTreeClient for same reason as above.
@@ -1773,7 +1773,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(shell(), ws3(), shell_url(), window_1_2));
+ ASSERT_FALSE(EmbedUrl(connector(), ws3(), test_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 d80ef83..46f3e91 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::Shell* shell,
+ mojo::Connector* connector,
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(shell, gpu_state, surfaces_state)),
+ DisplayManager::Create(connector, 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 cace4be..a1f93d1 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::Shell* shell,
+ mojo::Connector* connector,
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 99e53a5..bafcf2d 100644
--- a/components/mus/ws/window_tree_unittest.cc
+++ b/components/mus/ws/window_tree_unittest.cc
@@ -352,7 +352,7 @@ class TestDisplayManagerFactory : public DisplayManagerFactory {
: cursor_id_storage_(cursor_id_storage) {}
~TestDisplayManagerFactory() {}
DisplayManager* CreateDisplayManager(
- mojo::Shell* shell,
+ mojo::Connector* connector,
const scoped_refptr<GpuState>& gpu_state,
const scoped_refptr<mus::SurfacesState>& surfaces_state) override {
return new TestDisplayManager(cursor_id_storage_);