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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h

Issue 338093008: Client side name cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/public/cpp/view_manager/lib/view_manager_client_impl.h
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
similarity index 81%
rename from mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
rename to mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
index 4de6b6c98cf8513e241e293fcc29c1cfd7cfa236..cccdc0899467bcea89d59e339bc750289a9f6048 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_
-#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_
+#ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
+#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
+#include "mojo/services/public/cpp/view_manager/node.h"
+#include "mojo/services/public/cpp/view_manager/types.h"
#include "mojo/services/public/cpp/view_manager/view_manager.h"
-#include "mojo/services/public/cpp/view_manager/view_manager_types.h"
-#include "mojo/services/public/cpp/view_manager/view_tree_node.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
class SkBitmap;
@@ -24,19 +24,19 @@ class ViewManager;
class ViewManagerTransaction;
// Manages the connection with the View Manager service.
-class ViewManagerSynchronizer : public ViewManager,
- public InterfaceImpl<ViewManagerClient> {
+class ViewManagerClientImpl : public ViewManager,
+ public InterfaceImpl<ViewManagerClient> {
public:
- explicit ViewManagerSynchronizer(ViewManagerDelegate* delegate);
- virtual ~ViewManagerSynchronizer();
+ explicit ViewManagerClientImpl(ViewManagerDelegate* delegate);
+ virtual ~ViewManagerClientImpl();
bool connected() const { return connected_; }
ConnectionSpecificId connection_id() const { return connection_id_; }
// API exposed to the node/view implementations that pushes local changes to
// the service.
- Id CreateViewTreeNode();
- void DestroyViewTreeNode(Id node_id);
+ Id CreateNode();
+ void DestroyNode(Id node_id);
Id CreateView();
void DestroyView(Id view_id);
@@ -69,7 +69,7 @@ class ViewManagerSynchronizer : public ViewManager,
// Start/stop tracking nodes & views. While tracked, they can be retrieved via
// ViewManager::GetNode/ViewById.
- void AddNode(ViewTreeNode* node);
+ void AddNode(Node* node);
void RemoveNode(Id node_id);
void AddView(View* view);
@@ -80,15 +80,13 @@ class ViewManagerSynchronizer : public ViewManager,
friend class ViewManagerTransaction;
typedef ScopedVector<ViewManagerTransaction> Transactions;
- typedef std::map<Id, ViewTreeNode*> IdToNodeMap;
+ typedef std::map<Id, Node*> IdToNodeMap;
typedef std::map<Id, View*> IdToViewMap;
- typedef std::map<ConnectionSpecificId,
- ViewManagerSynchronizer*> SynchronizerMap;
// Overridden from ViewManager:
virtual const std::string& GetEmbedderURL() const OVERRIDE;
- virtual const std::vector<ViewTreeNode*>& GetRoots() const OVERRIDE;
- virtual ViewTreeNode* GetNodeById(Id id) OVERRIDE;
+ virtual const std::vector<Node*>& GetRoots() const OVERRIDE;
+ virtual Node* GetNodeById(Id id) OVERRIDE;
virtual View* GetViewById(Id id) OVERRIDE;
// Overridden from InterfaceImpl:
@@ -131,8 +129,8 @@ class ViewManagerSynchronizer : public ViewManager,
// front of the queue.
void RemoveFromPendingQueue(ViewManagerTransaction* transaction);
- void AddRoot(ViewTreeNode* root);
- void RemoveRoot(ViewTreeNode* root);
+ void AddRoot(Node* root);
+ void RemoveRoot(Node* root);
bool connected_;
ConnectionSpecificId connection_id_;
@@ -147,17 +145,17 @@ class ViewManagerSynchronizer : public ViewManager,
ViewManagerDelegate* delegate_;
- std::vector<ViewTreeNode*> roots_;
+ std::vector<Node*> roots_;
IdToNodeMap nodes_;
IdToViewMap views_;
ViewManagerService* service_;
- DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer);
+ DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl);
};
} // namespace view_manager
} // namespace mojo
-#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_SYNCHRONIZER_H_
+#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698