| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/wm/core/capture_controller.h" | 5 #include "ui/wm/core/capture_controller.h" |
| 6 | 6 |
| 7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 #include "ui/aura/window_event_dispatcher.h" | 8 #include "ui/aura/window_event_dispatcher.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace wm { |
| 11 namespace corewm { | |
| 12 | 11 |
| 13 //////////////////////////////////////////////////////////////////////////////// | 12 //////////////////////////////////////////////////////////////////////////////// |
| 14 // CaptureController, public: | 13 // CaptureController, public: |
| 15 | 14 |
| 16 void CaptureController::Attach(aura::Window* root) { | 15 void CaptureController::Attach(aura::Window* root) { |
| 17 DCHECK_EQ(0u, root_windows_.count(root)); | 16 DCHECK_EQ(0u, root_windows_.count(root)); |
| 18 root_windows_.insert(root); | 17 root_windows_.insert(root); |
| 19 aura::client::SetCaptureClient(root, this); | 18 aura::client::SetCaptureClient(root, this); |
| 20 } | 19 } |
| 21 | 20 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 134 |
| 136 root_window_->RemoveObserver(this); | 135 root_window_->RemoveObserver(this); |
| 137 capture_controller_->Detach(root_window_); | 136 capture_controller_->Detach(root_window_); |
| 138 if (!capture_controller_->is_active()) { | 137 if (!capture_controller_->is_active()) { |
| 139 delete capture_controller_; | 138 delete capture_controller_; |
| 140 capture_controller_ = NULL; | 139 capture_controller_ = NULL; |
| 141 } | 140 } |
| 142 root_window_ = NULL; | 141 root_window_ = NULL; |
| 143 } | 142 } |
| 144 | 143 |
| 145 } // namespace corewm | 144 } // namespace wm |
| 146 } // namespace views | |
| OLD | NEW |