| 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();
|
| }
|
|
|
|
|