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

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

Issue 311423003: Provide an API to the example window manager app that supports closing a window. (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
« no previous file with comments | « mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/cpp/view_manager/view_manager.h
diff --git a/mojo/services/public/cpp/view_manager/view_manager.h b/mojo/services/public/cpp/view_manager/view_manager.h
index 28e45625b45c8648e55db235f0ee29b81b6643e5..54caf789f7d8c95066d0ffc050371b8ea62463a4 100644
--- a/mojo/services/public/cpp/view_manager/view_manager.h
+++ b/mojo/services/public/cpp/view_manager/view_manager.h
@@ -28,17 +28,18 @@ class ViewTreeNode;
// TODO: displays
class ViewManager {
public:
+ typedef base::Callback<void(ViewManager*, ViewTreeNode*)> RootCallback;
+
~ViewManager();
// |ready_callback| is run when the ViewManager connection is established
// and ready to use.
static void Create(
Application* application,
- const base::Callback<void(ViewManager*)>& root_added_callback);
+ const RootCallback& root_added_callback,
+ const RootCallback& root_removed_callback);
// Blocks until ViewManager is ready to use.
- static ViewManager* CreateBlocking(
- Application* application,
- const base::Callback<void(ViewManager*)>& root_added_callback);
+ static ViewManager* CreateBlocking(Application* application);
const std::vector<ViewTreeNode*>& roots() { return roots_; }
@@ -51,9 +52,11 @@ class ViewManager {
typedef std::map<TransportViewId, View*> IdToViewMap;
ViewManager(Application* application,
- const base::Callback<void(ViewManager*)>& root_added_callback);
+ const RootCallback& root_added_callback,
+ const RootCallback& root_removed_callback);
- base::Callback<void(ViewManager*)> root_added_callback_;
+ RootCallback root_added_callback_;
+ RootCallback root_removed_callback_;
ViewManagerSynchronizer* synchronizer_;
« no previous file with comments | « mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698