Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: mojo/services/view_manager/view_manager_connection.h

Issue 320193002: Consolidates view_manager typedefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: formatting Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/view_manager/view_manager_connection.h
diff --git a/mojo/services/view_manager/view_manager_connection.h b/mojo/services/view_manager/view_manager_connection.h
index c4fe4561891b7cdcae9afd6cde1bfe44b900ee72..2c55e1ef12cde769578933418c3ac0c1bf8f750e 100644
--- a/mojo/services/view_manager/view_manager_connection.h
+++ b/mojo/services/view_manager/view_manager_connection.h
@@ -42,7 +42,7 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
public NodeDelegate {
public:
ViewManagerConnection(RootNodeManager* root_node_manager,
- TransportConnectionId creator_id,
+ ConnectionSpecificId creator_id,
const std::string& url);
virtual ~ViewManagerConnection();
@@ -50,8 +50,8 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
// IViewManager::Connect(). When set OnConnectionError() deletes |this|.
void set_delete_on_connection_error() { delete_on_connection_error_ = true; }
- TransportConnectionId id() const { return id_; }
- TransportConnectionId creator_id() const { return creator_id_; }
+ ConnectionSpecificId id() const { return id_; }
+ ConnectionSpecificId creator_id() const { return creator_id_; }
const std::string& url() const { return url_; }
// Returns the Node with the specified id.
@@ -68,10 +68,10 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
}
const View* GetView(const ViewId& id) const;
- void SetRoots(const Array<TransportNodeId>& node_ids);
+ void SetRoots(const Array<Id>& node_ids);
// Invoked when a connection is destroyed.
- void OnViewManagerConnectionDestroyed(TransportConnectionId id);
+ void OnViewManagerConnectionDestroyed(ConnectionSpecificId id);
// The following methods are invoked after the corresponding change has been
// processed. They do the appropriate bookkeeping and update the client as
@@ -83,14 +83,14 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
void ProcessNodeHierarchyChanged(const Node* node,
const Node* new_parent,
const Node* old_parent,
- TransportChangeId server_change_id,
+ Id server_change_id,
bool originated_change);
void ProcessNodeViewReplaced(const Node* node,
const View* new_view,
const View* old_view,
bool originated_change);
void ProcessNodeDeleted(const NodeId& node,
- TransportChangeId server_change_id,
+ Id server_change_id,
bool originated_change);
void ProcessViewDeleted(const ViewId& view, bool originated_change);
void ProcessViewInputEvent(const View* view, const ui::Event* event);
@@ -101,9 +101,9 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
virtual void OnConnectionError() MOJO_OVERRIDE;
private:
- typedef std::map<TransportConnectionSpecificNodeId, Node*> NodeMap;
- typedef std::map<TransportConnectionSpecificViewId, View*> ViewMap;
- typedef base::hash_set<TransportNodeId> NodeIdSet;
+ typedef std::map<ConnectionSpecificId, Node*> NodeMap;
+ typedef std::map<ConnectionSpecificId, View*> ViewMap;
+ typedef base::hash_set<Id> NodeIdSet;
// These functions return true if the corresponding mojom function is allowed
// for this connection.
@@ -137,7 +137,7 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
// Adds |node_ids| to roots, returning true if at least one of the nodes was
// not already a root. If at least one of the nodes was not already a root
// the client is told of the new roots.
- bool AddRoots(const std::vector<TransportNodeId>& node_ids);
+ bool AddRoots(const std::vector<Id>& node_ids);
// Returns true if |node| is a non-null and a descendant of |roots_| (or
// |roots_| is empty).
@@ -157,33 +157,33 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
Array<INodePtr> NodesToINodes(const std::vector<const Node*>& nodes);
// Overridden from IViewManager:
- virtual void CreateNode(TransportNodeId transport_node_id,
+ virtual void CreateNode(Id transport_node_id,
const Callback<void(bool)>& callback) OVERRIDE;
- virtual void DeleteNode(TransportNodeId transport_node_id,
+ virtual void DeleteNode(Id transport_node_id,
const Callback<void(bool)>& callback) OVERRIDE;
- virtual void AddNode(TransportNodeId parent_id,
- TransportNodeId child_id,
- TransportChangeId server_change_id,
+ virtual void AddNode(Id parent_id,
+ Id child_id,
+ Id server_change_id,
const Callback<void(bool)>& callback) OVERRIDE;
virtual void RemoveNodeFromParent(
- TransportNodeId node_id,
- TransportChangeId server_change_id,
+ Id node_id,
+ Id server_change_id,
const Callback<void(bool)>& callback) OVERRIDE;
virtual void GetNodeTree(
- TransportNodeId node_id,
+ Id node_id,
const Callback<void(Array<INodePtr>)>& callback) OVERRIDE;
- virtual void CreateView(TransportViewId transport_view_id,
+ virtual void CreateView(Id transport_view_id,
const Callback<void(bool)>& callback) OVERRIDE;
- virtual void DeleteView(TransportViewId transport_view_id,
+ virtual void DeleteView(Id transport_view_id,
const Callback<void(bool)>& callback) OVERRIDE;
- virtual void SetView(TransportNodeId transport_node_id,
- TransportViewId transport_view_id,
+ virtual void SetView(Id transport_node_id,
+ Id transport_view_id,
const Callback<void(bool)>& callback) OVERRIDE;
- virtual void SetViewContents(TransportViewId view_id,
+ virtual void SetViewContents(Id view_id,
ScopedSharedBufferHandle buffer,
uint32_t buffer_size,
const Callback<void(bool)>& callback) OVERRIDE;
- virtual void SetNodeBounds(TransportNodeId node_id,
+ virtual void SetNodeBounds(Id node_id,
RectPtr bounds,
const Callback<void(bool)>& callback) OVERRIDE;
virtual void Connect(const mojo::String& url,
@@ -206,14 +206,14 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
RootNodeManager* root_node_manager_;
// Id of this connection as assigned by RootNodeManager.
- const TransportConnectionId id_;
+ const ConnectionSpecificId id_;
// URL this connection was created for.
const std::string url_;
// 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.
- TransportConnectionId creator_id_;
+ ConnectionSpecificId creator_id_;
NodeMap node_map_;
« no previous file with comments | « mojo/services/view_manager/test_change_tracker.cc ('k') | mojo/services/view_manager/view_manager_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698