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

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
« no previous file with comments | « mojo/services/window_manager/window_manager_app.h ('k') | mojo/shell/view_manager_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 02e5b95ef789687c02c51c0c45e7844894e1f514..ccc38984be14c34694f5a59c45f1b734381bebf1 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -70,12 +70,14 @@ class WMFocusRules : public wm::FocusRules {
////////////////////////////////////////////////////////////////////////////////
// WindowManagerApp, public:
-WindowManagerApp::WindowManagerApp()
+WindowManagerApp::WindowManagerApp(view_manager::ViewManagerDelegate* delegate)
: InterfaceFactoryWithContext(this),
+ wrapped_delegate_(delegate),
view_manager_(NULL),
view_manager_client_factory_(this),
root_(NULL) {
}
+
WindowManagerApp::~WindowManagerApp() {
// TODO(beng): Figure out if this should be done in
// OnViewManagerDisconnected().
@@ -169,7 +171,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) {
@@ -180,6 +182,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;
@@ -274,12 +277,4 @@ void WindowManagerApp::UnregisterSubtree(view_manager::Id id) {
UnregisterSubtree((*child)->id());
}
-////////////////////////////////////////////////////////////////////////////////
-// ApplicationDelegate, public:
-
-// static
-ApplicationDelegate* ApplicationDelegate::Create() {
- return new WindowManagerApp;
-}
-
} // namespace mojo
« no previous file with comments | « mojo/services/window_manager/window_manager_app.h ('k') | mojo/shell/view_manager_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698