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

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

Issue 466273002: Remove OpenWindow from the WindowManager interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 a77f10d6105515b85c86b5349405c0bb484629ec..56d123923818dca9d72d6a6cc779c55b05c01772 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -78,15 +78,7 @@ WindowManagerApp::WindowManagerApp(ViewManagerDelegate* delegate)
root_(NULL) {
}
-WindowManagerApp::~WindowManagerApp() {
- // TODO(beng): Figure out if this should be done in
- // OnViewManagerDisconnected().
- STLDeleteValues(&view_id_to_window_map_);
- if (focus_client_.get())
- focus_client_->RemoveObserver(this);
- if (activation_client_)
- activation_client_->RemoveObserver(this);
-}
+WindowManagerApp::~WindowManagerApp() {}
void WindowManagerApp::AddConnection(WindowManagerServiceImpl* connection) {
DCHECK(connections_.find(connection) == connections_.end());
@@ -98,19 +90,6 @@ void WindowManagerApp::RemoveConnection(WindowManagerServiceImpl* connection) {
connections_.erase(connection);
}
-Id WindowManagerApp::OpenWindow() {
- View* view = View::Create(view_manager_);
- root_->AddChild(view);
- return view->id();
-}
-
-Id WindowManagerApp::OpenWindowWithURL(const String& url) {
- View* view = View::Create(view_manager_);
- root_->AddChild(view);
- view->Embed(url);
- return view->id();
-}
-
void WindowManagerApp::SetCapture(Id view) {
capture_client_->capture_client()->SetCapture(GetWindowForViewId(view));
// TODO(beng): notify connected clients that capture has changed, probably
@@ -218,6 +197,11 @@ void WindowManagerApp::OnTreeChanged(
void WindowManagerApp::OnViewDestroyed(View* view) {
root_ = NULL;
+ STLDeleteValues(&view_id_to_window_map_);
+ if (focus_client_.get())
+ focus_client_->RemoveObserver(this);
+ if (activation_client_)
+ activation_client_->RemoveObserver(this);
window_tree_host_.reset();
}
« no previous file with comments | « mojo/services/window_manager/window_manager_app.h ('k') | mojo/services/window_manager/window_manager_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698