summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 00:04:44 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 00:04:44 +0000
commit3aadc6e432d2dd082a509d777ec294cc4377643c (patch)
treefc98b24046a24515e21efaa81519ac3ec04a4af3
parent0981210ca9981253dac337a6551c993a929dab00 (diff)
downloadchromium_src-3aadc6e432d2dd082a509d777ec294cc4377643c.zip
chromium_src-3aadc6e432d2dd082a509d777ec294cc4377643c.tar.gz
chromium_src-3aadc6e432d2dd082a509d777ec294cc4377643c.tar.bz2
Renames IViewManagerClient::OnConnectionEstablished
InterfaceImpl has a function of the same name. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/291193012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272646 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h2
-rw-r--r--mojo/services/public/interfaces/view_manager/view_manager.mojom6
-rw-r--r--mojo/services/view_manager/view_manager_connection.cc28
-rw-r--r--mojo/services/view_manager/view_manager_connection.h5
-rw-r--r--mojo/services/view_manager/view_manager_connection_unittest.cc2
6 files changed, 23 insertions, 22 deletions
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
index 7b58f97..a901380 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
@@ -516,7 +516,7 @@ void ViewManagerSynchronizer::SetViewContents(TransportViewId view_id,
////////////////////////////////////////////////////////////////////////////////
// ViewManagerSynchronizer, IViewManagerClient implementation:
-void ViewManagerSynchronizer::OnConnectionEstablished(
+void ViewManagerSynchronizer::OnViewManagerConnectionEstablished(
TransportConnectionId connection_id,
TransportChangeId next_server_change_id,
const Array<INode>& nodes) {
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
index 9330336..71200d0 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
@@ -66,7 +66,7 @@ class ViewManagerSynchronizer : public IViewManagerClient {
typedef ScopedVector<ViewManagerTransaction> Transactions;
// Overridden from IViewManagerClient:
- virtual void OnConnectionEstablished(
+ virtual void OnViewManagerConnectionEstablished(
TransportConnectionId connection_id,
TransportChangeId next_server_change_id,
const mojo::Array<INode>& nodes) OVERRIDE;
diff --git a/mojo/services/public/interfaces/view_manager/view_manager.mojom b/mojo/services/public/interfaces/view_manager/view_manager.mojom
index 8c9cad32..b2839b8 100644
--- a/mojo/services/public/interfaces/view_manager/view_manager.mojom
+++ b/mojo/services/public/interfaces/view_manager/view_manager.mojom
@@ -101,9 +101,9 @@ interface IViewManagerClient {
// that uniquely identifies this connection. |next_server_change_id| is the
// id of the next change the server is expecting. |nodes| are the nodes
// parented to the root.
- OnConnectionEstablished(uint16 connection_id,
- uint32 next_server_change_id,
- INode[] nodes);
+ OnViewManagerConnectionEstablished(uint16 connection_id,
+ uint32 next_server_change_id,
+ INode[] nodes);
// This is sent to clients when a change is made to the server that results
// in the |server_change_id| changing but the client isn't notified. This is
diff --git a/mojo/services/view_manager/view_manager_connection.cc b/mojo/services/view_manager/view_manager_connection.cc
index 76656b6..1d73076 100644
--- a/mojo/services/view_manager/view_manager_connection.cc
+++ b/mojo/services/view_manager/view_manager_connection.cc
@@ -71,19 +71,6 @@ ViewManagerConnection::~ViewManagerConnection() {
root_node_manager_->RemoveConnection(this);
}
-void ViewManagerConnection::OnConnectionEstablished() {
- DCHECK_EQ(0, id_); // Should only get OnConnectionEstablished() once.
- id_ = root_node_manager_->GetAndAdvanceNextConnectionId();
- root_node_manager_->AddConnection(this);
- std::vector<const Node*> to_send;
- GetUnknownNodesFrom(root_node_manager_->root(), &to_send);
- AllocationScope allocation_scope;
- client()->OnConnectionEstablished(
- id_,
- root_node_manager_->next_server_change_id(),
- NodesToINodes(to_send));
-}
-
const Node* ViewManagerConnection::GetNode(const NodeId& id) const {
if (id_ == id.connection_id) {
NodeMap::const_iterator i = node_map_.find(id.node_id);
@@ -424,7 +411,7 @@ bool ViewManagerConnection::ProcessSetRoots(
for (NodeIdSet::const_iterator i = roots_.begin(); i != roots_.end(); ++i)
GetUnknownNodesFrom(GetNode(NodeIdFromTransportId(*i)), &to_send);
AllocationScope allocation_scope;
- client()->OnConnectionEstablished(
+ client()->OnViewManagerConnectionEstablished(
id_,
root_node_manager_->next_server_change_id(),
NodesToINodes(to_send));
@@ -638,6 +625,19 @@ void ViewManagerConnection::OnNodeViewReplaced(const Node* node,
root_node_manager_->ProcessNodeViewReplaced(node, new_view, old_view);
}
+void ViewManagerConnection::OnConnectionEstablished() {
+ DCHECK_EQ(0, id_); // Should only get OnConnectionEstablished() once.
+ id_ = root_node_manager_->GetAndAdvanceNextConnectionId();
+ root_node_manager_->AddConnection(this);
+ std::vector<const Node*> to_send;
+ GetUnknownNodesFrom(root_node_manager_->root(), &to_send);
+ AllocationScope allocation_scope;
+ client()->OnViewManagerConnectionEstablished(
+ id_,
+ root_node_manager_->next_server_change_id(),
+ NodesToINodes(to_send));
+}
+
} // namespace service
} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/view_manager_connection.h b/mojo/services/view_manager/view_manager_connection.h
index d0c16ab..a8849b3 100644
--- a/mojo/services/view_manager/view_manager_connection.h
+++ b/mojo/services/view_manager/view_manager_connection.h
@@ -43,8 +43,6 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
ViewManagerConnection(RootNodeManager* root_node_manager);
virtual ~ViewManagerConnection();
- virtual void OnConnectionEstablished() MOJO_OVERRIDE;
-
TransportConnectionId id() const { return id_; }
// Returns the Node with the specified id.
@@ -178,6 +176,9 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
const View* new_view,
const View* old_view) OVERRIDE;
+ // InterfaceImp overrides:
+ virtual void OnConnectionEstablished() MOJO_OVERRIDE;
+
RootNodeManager* root_node_manager_;
// Id of this connection as assigned by RootNodeManager. Assigned in
diff --git a/mojo/services/view_manager/view_manager_connection_unittest.cc b/mojo/services/view_manager/view_manager_connection_unittest.cc
index fe507b5e..63c20ac 100644
--- a/mojo/services/view_manager/view_manager_connection_unittest.cc
+++ b/mojo/services/view_manager/view_manager_connection_unittest.cc
@@ -272,7 +272,7 @@ class ViewManagerClientImpl : public IViewManagerClient {
private:
// IViewManagerClient overrides:
- virtual void OnConnectionEstablished(
+ virtual void OnViewManagerConnectionEstablished(
TransportConnectionId connection_id,
TransportChangeId next_server_change_id,
const mojo::Array<INode>& nodes) OVERRIDE {