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

Unified Diff: ui/views/corewm/capture_controller.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | « ui/views/corewm/capture_controller.h ('k') | ui/views/corewm/compound_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/capture_controller.cc
diff --git a/ui/views/corewm/capture_controller.cc b/ui/views/corewm/capture_controller.cc
index 1276c82b91030b07ee38eb6973f8321b2a006ceb..59ff199eb0bbd456e7ba685338dab76f4234cde9 100644
--- a/ui/views/corewm/capture_controller.cc
+++ b/ui/views/corewm/capture_controller.cc
@@ -13,13 +13,13 @@ namespace corewm {
////////////////////////////////////////////////////////////////////////////////
// CaptureController, public:
-void CaptureController::Attach(aura::RootWindow* root) {
+void CaptureController::Attach(aura::Window* root) {
DCHECK_EQ(0u, root_windows_.count(root));
root_windows_.insert(root);
aura::client::SetCaptureClient(root, this);
}
-void CaptureController::Detach(aura::RootWindow* root) {
+void CaptureController::Detach(aura::Window* root) {
root_windows_.erase(root);
aura::client::SetCaptureClient(root, NULL);
}
@@ -36,7 +36,7 @@ void CaptureController::SetCapture(aura::Window* new_capture_window) {
DCHECK(!capture_window_ || capture_window_->GetRootWindow());
aura::Window* old_capture_window = capture_window_;
- aura::RootWindow* old_capture_root = old_capture_window ?
+ aura::Window* old_capture_root = old_capture_window ?
old_capture_window->GetRootWindow() : NULL;
// Copy the list in case it's modified out from under us.
@@ -57,19 +57,20 @@ void CaptureController::SetCapture(aura::Window* new_capture_window) {
for (RootWindows::const_iterator i = root_windows.begin();
i != root_windows.end(); ++i) {
- aura::client::CaptureDelegate* delegate = *i;
+ aura::client::CaptureDelegate* delegate = (*i)->GetDispatcher();
delegate->UpdateCapture(old_capture_window, new_capture_window);
}
- aura::RootWindow* capture_root =
+ aura::Window* capture_root =
capture_window_ ? capture_window_->GetRootWindow() : NULL;
if (capture_root != old_capture_root) {
if (old_capture_root) {
- aura::client::CaptureDelegate* delegate = old_capture_root;
+ aura::client::CaptureDelegate* delegate =
+ old_capture_root->GetDispatcher();
delegate->ReleaseNativeCapture();
}
if (capture_root) {
- aura::client::CaptureDelegate* delegate = capture_root;
+ aura::client::CaptureDelegate* delegate = capture_root->GetDispatcher();
delegate->SetNativeCapture();
}
}
@@ -101,7 +102,7 @@ CaptureController::~CaptureController() {
// static
CaptureController* ScopedCaptureClient::capture_controller_ = NULL;
-ScopedCaptureClient::ScopedCaptureClient(aura::RootWindow* root)
+ScopedCaptureClient::ScopedCaptureClient(aura::Window* root)
: root_window_(root) {
root->AddObserver(this);
if (!capture_controller_)
« no previous file with comments | « ui/views/corewm/capture_controller.h ('k') | ui/views/corewm/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698