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

Side by Side Diff: ui/views/widget/desktop_capture_client.cc

Issue 10910144: Get mouse events to work with win aura, and make the combobox function in the views examples app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/desktop_capture_client.h ('k') | ui/views/widget/desktop_native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/views/widget/desktop_capture_client.h"
6
7 #include "ui/aura/root_window.h"
8 #include "ui/aura/window.h"
9
10 namespace views {
11
12 DesktopCaptureClient::DesktopCaptureClient() : capture_window_(NULL) {
13 }
14
15 DesktopCaptureClient::~DesktopCaptureClient() {
16 }
17
18 void DesktopCaptureClient::SetCapture(aura::Window* window) {
19 if (window) {
20 DCHECK(window->GetRootWindow());
21 if (capture_window_)
22 DCHECK_EQ(window->GetRootWindow(), capture_window_->GetRootWindow());
23 }
24
25 aura::Window* old_capture = capture_window_;
26 capture_window_ = window;
27
28 aura::RootWindow* root_window = window ? window->GetRootWindow() :
29 capture_window_ ? capture_window_->GetRootWindow() : NULL;
30 if (root_window)
31 root_window->UpdateCapture(old_capture, window);
32 }
33
34 void DesktopCaptureClient::ReleaseCapture(aura::Window* window) {
35 if (capture_window_ != window)
36 return;
37 SetCapture(NULL);
38 }
39
40 aura::Window* DesktopCaptureClient::GetCaptureWindow() {
41 return capture_window_;
42 }
43
44 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_capture_client.h ('k') | ui/views/widget/desktop_native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698