summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-12-30 14:03:56 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-30 22:05:07 +0000
commitd6da931d8f49e4d4afc3272389ab71af75e75fc1 (patch)
treecf8d405debf48061391972f52f84eb0b15889345
parentea362d37baa7f297ddafebe7efc2171233a0b97f (diff)
downloadchromium_src-d6da931d8f49e4d4afc3272389ab71af75e75fc1.zip
chromium_src-d6da931d8f49e4d4afc3272389ab71af75e75fc1.tar.gz
chromium_src-d6da931d8f49e4d4afc3272389ab71af75e75fc1.tar.bz2
Removes WindowTreeImpl::creator_id_
It's no longer used. BUG=none TEST=none R=ben@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/1554783002 Cr-Commit-Position: refs/heads/master@{#367190}
-rw-r--r--components/mus/mus_app.cc5
-rw-r--r--components/mus/mus_app.h1
-rw-r--r--components/mus/ws/connection_manager.cc3
-rw-r--r--components/mus/ws/connection_manager.h3
-rw-r--r--components/mus/ws/connection_manager_delegate.h1
-rw-r--r--components/mus/ws/window_tree_host_connection.cc2
-rw-r--r--components/mus/ws/window_tree_impl.cc6
-rw-r--r--components/mus/ws/window_tree_impl.h6
-rw-r--r--components/mus/ws/window_tree_unittest.cc7
9 files changed, 9 insertions, 25 deletions
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index ff44dbc..d319aa6 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -98,12 +98,11 @@ ws::ClientConnection*
MandolineUIServicesApp::CreateClientConnectionForEmbedAtWindow(
ws::ConnectionManager* connection_manager,
mojo::InterfaceRequest<mojom::WindowTree> tree_request,
- ConnectionSpecificId creator_id,
const ws::WindowId& root_id,
uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client) {
- scoped_ptr<ws::WindowTreeImpl> service(new ws::WindowTreeImpl(
- connection_manager, creator_id, root_id, policy_bitmask));
+ scoped_ptr<ws::WindowTreeImpl> service(
+ new ws::WindowTreeImpl(connection_manager, root_id, policy_bitmask));
return new ws::DefaultClientConnection(std::move(service), connection_manager,
std::move(tree_request),
std::move(client));
diff --git a/components/mus/mus_app.h b/components/mus/mus_app.h
index bae8ed7..5be9031 100644
--- a/components/mus/mus_app.h
+++ b/components/mus/mus_app.h
@@ -63,7 +63,6 @@ class MandolineUIServicesApp
ws::ClientConnection* CreateClientConnectionForEmbedAtWindow(
ws::ConnectionManager* connection_manager,
mojo::InterfaceRequest<mojom::WindowTree> tree_request,
- ConnectionSpecificId creator_id,
const ws::WindowId& root_id,
uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client) override;
diff --git a/components/mus/ws/connection_manager.cc b/components/mus/ws/connection_manager.cc
index 45f65ec..9f14860 100644
--- a/components/mus/ws/connection_manager.cc
+++ b/components/mus/ws/connection_manager.cc
@@ -141,14 +141,13 @@ void ConnectionManager::OnHostConnectionClosed(
}
WindowTreeImpl* ConnectionManager::EmbedAtWindow(
- ConnectionSpecificId creator_id,
const WindowId& window_id,
uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client) {
mojom::WindowTreePtr service_ptr;
ClientConnection* client_connection =
delegate_->CreateClientConnectionForEmbedAtWindow(
- this, GetProxy(&service_ptr), creator_id, window_id, policy_bitmask,
+ this, GetProxy(&service_ptr), window_id, policy_bitmask,
std::move(client));
AddConnection(client_connection);
client_connection->service()->Init(client_connection->client(),
diff --git a/components/mus/ws/connection_manager.h b/components/mus/ws/connection_manager.h
index f16ac18..21e91ed 100644
--- a/components/mus/ws/connection_manager.h
+++ b/components/mus/ws/connection_manager.h
@@ -70,8 +70,7 @@ class ConnectionManager : public ServerWindowDelegate,
// See description of WindowTree::Embed() for details. This assumes
// |transport_window_id| is valid.
- WindowTreeImpl* EmbedAtWindow(ConnectionSpecificId creator_id,
- const WindowId& window_id,
+ WindowTreeImpl* EmbedAtWindow(const WindowId& window_id,
uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client);
diff --git a/components/mus/ws/connection_manager_delegate.h b/components/mus/ws/connection_manager_delegate.h
index 730be4b..56acda4 100644
--- a/components/mus/ws/connection_manager_delegate.h
+++ b/components/mus/ws/connection_manager_delegate.h
@@ -32,7 +32,6 @@ class ConnectionManagerDelegate {
virtual ClientConnection* CreateClientConnectionForEmbedAtWindow(
ConnectionManager* connection_manager,
mojo::InterfaceRequest<mojom::WindowTree> tree_request,
- ConnectionSpecificId creator_id,
const WindowId& root_id,
uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client) = 0;
diff --git a/components/mus/ws/window_tree_host_connection.cc b/components/mus/ws/window_tree_host_connection.cc
index f488fc4..6f78af3 100644
--- a/components/mus/ws/window_tree_host_connection.cc
+++ b/components/mus/ws/window_tree_host_connection.cc
@@ -62,7 +62,7 @@ WindowTreeHostConnectionImpl::~WindowTreeHostConnectionImpl() {}
void WindowTreeHostConnectionImpl::OnDisplayInitialized() {
connection_manager()->AddHost(this);
set_window_tree(connection_manager()->EmbedAtWindow(
- kInvalidConnectionId, window_tree_host()->root_window()->id(),
+ window_tree_host()->root_window()->id(),
mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT, std::move(client_)));
}
diff --git a/components/mus/ws/window_tree_impl.cc b/components/mus/ws/window_tree_impl.cc
index f80dfcb..fb2c92a 100644
--- a/components/mus/ws/window_tree_impl.cc
+++ b/components/mus/ws/window_tree_impl.cc
@@ -64,12 +64,10 @@ class TargetedEvent : public ServerWindowObserver {
};
WindowTreeImpl::WindowTreeImpl(ConnectionManager* connection_manager,
- ConnectionSpecificId creator_id,
const WindowId& root_id,
uint32_t policy_bitmask)
: connection_manager_(connection_manager),
id_(connection_manager_->GetAndAdvanceNextConnectionId()),
- creator_id_(creator_id),
client_(nullptr),
event_ack_id_(0),
is_embed_root_(false),
@@ -133,8 +131,6 @@ WindowTreeHostImpl* WindowTreeImpl::GetHost() const {
}
void WindowTreeImpl::OnWillDestroyWindowTreeImpl(WindowTreeImpl* connection) {
- if (creator_id_ == connection->id())
- creator_id_ = kInvalidConnectionId;
const ServerWindow* connection_root =
connection->root_ ? connection->GetWindow(*connection->root_) : nullptr;
if (connection_root &&
@@ -225,7 +221,7 @@ bool WindowTreeImpl::Embed(const WindowId& window_id,
return false;
PrepareForEmbed(window_id);
WindowTreeImpl* new_connection = connection_manager_->EmbedAtWindow(
- id_, window_id, policy_bitmask, std::move(client));
+ window_id, policy_bitmask, std::move(client));
if (is_embed_root_)
*connection_id = new_connection->id();
return true;
diff --git a/components/mus/ws/window_tree_impl.h b/components/mus/ws/window_tree_impl.h
index 93a3c5b..e883bb3 100644
--- a/components/mus/ws/window_tree_impl.h
+++ b/components/mus/ws/window_tree_impl.h
@@ -45,7 +45,6 @@ class WindowTreeImpl : public mojom::WindowTree,
public mojom::WindowManagerInternalClient {
public:
WindowTreeImpl(ConnectionManager* connection_manager,
- ConnectionSpecificId creator_id,
const WindowId& root_id,
uint32_t policy_bitmask);
~WindowTreeImpl() override;
@@ -53,7 +52,6 @@ class WindowTreeImpl : public mojom::WindowTree,
void Init(mojom::WindowTreeClient* client, mojom::WindowTreePtr tree);
ConnectionSpecificId id() const { return id_; }
- ConnectionSpecificId creator_id() const { return creator_id_; }
mojom::WindowTreeClient* client() { return client_; }
@@ -277,10 +275,6 @@ class WindowTreeImpl : public mojom::WindowTree,
// Id of this connection as assigned by ConnectionManager.
const ConnectionSpecificId id_;
- // ID of the connection that created us. If 0 it indicates either we were
- // created by the root, or the connection that created us has been destroyed.
- ConnectionSpecificId creator_id_;
-
mojom::WindowTreeClient* client_;
scoped_ptr<mus::ws::AccessPolicy> access_policy_;
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc
index 7d3509f..722f197 100644
--- a/components/mus/ws/window_tree_unittest.cc
+++ b/components/mus/ws/window_tree_unittest.cc
@@ -192,13 +192,12 @@ class TestConnectionManagerDelegate : public ConnectionManagerDelegate {
ClientConnection* CreateClientConnectionForEmbedAtWindow(
ConnectionManager* connection_manager,
mojo::InterfaceRequest<mus::mojom::WindowTree> service_request,
- ConnectionSpecificId creator_id,
const WindowId& root_id,
uint32_t policy_bitmask,
mus::mojom::WindowTreeClientPtr client) override {
// Used by ConnectionManager::AddRoot.
- scoped_ptr<WindowTreeImpl> service(new WindowTreeImpl(
- connection_manager, creator_id, root_id, policy_bitmask));
+ scoped_ptr<WindowTreeImpl> service(
+ new WindowTreeImpl(connection_manager, root_id, policy_bitmask));
last_connection_ = new TestClientConnection(std::move(service));
return last_connection_;
}
@@ -222,7 +221,7 @@ class TestWindowTreeHostConnection : public WindowTreeHostConnection {
void OnDisplayInitialized() override {
connection_manager()->AddHost(this);
set_window_tree(connection_manager()->EmbedAtWindow(
- kInvalidConnectionId, window_tree_host()->root_window()->id(),
+ window_tree_host()->root_window()->id(),
mus::mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT,
mus::mojom::WindowTreeClientPtr()));
}