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

Unified Diff: mojo/services/window_manager/window_manager_app.cc

Issue 400113005: A new WM bootstrap flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/window_manager/window_manager_app.cc
diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc
index bb096f5c9e3ec21df2469e34db0a0d9bb1e16e54..8610d06ca2422b3d0f92f426d7b6b4f6799f02da 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -71,7 +71,12 @@ class WMFocusRules : public wm::FocusRules {
////////////////////////////////////////////////////////////////////////////////
// WindowManagerApp, public:
-WindowManagerApp::WindowManagerApp() : view_manager_(NULL), root_(NULL) {}
+WindowManagerApp::WindowManagerApp(view_manager::ViewManagerDelegate* delegate)
+ : wrapped_delegate_(delegate),
+ view_manager_(NULL),
+ root_(NULL) {
+}
+
WindowManagerApp::~WindowManagerApp() {
// TODO(beng): Figure out if this should be done in
// OnViewManagerDisconnected().
@@ -165,7 +170,7 @@ void WindowManagerApp::OnRootAdded(view_manager::ViewManager* view_manager,
focus_client_->AddObserver(this);
activation_client_->AddObserver(this);
- // TODO(beng): Create the universe.
+ wrapped_delegate_->OnRootAdded(view_manager, root);
for (Connections::const_iterator it = connections_.begin();
it != connections_.end(); ++it) {
@@ -176,6 +181,7 @@ void WindowManagerApp::OnRootAdded(view_manager::ViewManager* view_manager,
void WindowManagerApp::OnViewManagerDisconnected(
view_manager::ViewManager* view_manager) {
DCHECK_EQ(view_manager_, view_manager);
+ wrapped_delegate_->OnViewManagerDisconnected(view_manager);
root_->RemoveObserver(this);
root_ = NULL;
view_manager_ = NULL;
@@ -270,12 +276,4 @@ void WindowManagerApp::UnregisterSubtree(view_manager::Id id) {
UnregisterSubtree((*child)->id());
}
-////////////////////////////////////////////////////////////////////////////////
-// ApplicationDelegate, public:
-
-// static
-ApplicationDelegate* ApplicationDelegate::Create() {
- return new WindowManagerApp;
-}
-
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698