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

Side by Side Diff: ui/aura/client/default_capture_client.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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/app_list_view.cc ('k') | ui/aura/client/focus_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/aura/client/default_capture_client.h" 5 #include "ui/aura/client/default_capture_client.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 8
9 namespace aura { 9 namespace aura {
10 namespace client { 10 namespace client {
(...skipping 12 matching lines...) Expand all
23 if (capture_window_ == window) 23 if (capture_window_ == window)
24 return; 24 return;
25 if (window) { 25 if (window) {
26 ui::GestureRecognizer::Get()->TransferEventsTo( 26 ui::GestureRecognizer::Get()->TransferEventsTo(
27 capture_window_, window); 27 capture_window_, window);
28 } 28 }
29 29
30 Window* old_capture_window = capture_window_; 30 Window* old_capture_window = capture_window_;
31 capture_window_ = window; 31 capture_window_ = window;
32 32
33 CaptureDelegate* capture_delegate = root_window_->GetRootWindow(); 33 CaptureDelegate* capture_delegate = root_window_->GetDispatcher();
34 if (capture_window_) 34 if (capture_window_)
35 capture_delegate->SetNativeCapture(); 35 capture_delegate->SetNativeCapture();
36 else 36 else
37 capture_delegate->ReleaseNativeCapture(); 37 capture_delegate->ReleaseNativeCapture();
38 38
39 capture_delegate->UpdateCapture(old_capture_window, capture_window_); 39 capture_delegate->UpdateCapture(old_capture_window, capture_window_);
40 } 40 }
41 41
42 void DefaultCaptureClient::ReleaseCapture(Window* window) { 42 void DefaultCaptureClient::ReleaseCapture(Window* window) {
43 if (capture_window_ != window) 43 if (capture_window_ != window)
44 return; 44 return;
45 SetCapture(NULL); 45 SetCapture(NULL);
46 } 46 }
47 47
48 Window* DefaultCaptureClient::GetCaptureWindow() { 48 Window* DefaultCaptureClient::GetCaptureWindow() {
49 return capture_window_; 49 return capture_window_;
50 } 50 }
51 51
52 } // namespace client 52 } // namespace client
53 } // namespace aura 53 } // namespace aura
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.cc ('k') | ui/aura/client/focus_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698