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

Side by Side Diff: ui/wm/core/capture_controller.h

Issue 194843004: Move files from ui/views/corewm to ui/wm/core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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/wm/core/base_focus_rules.cc ('k') | ui/wm/core/capture_controller.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 #ifndef UI_VIEWS_COREWM_CAPTURE_CONTROLLER_H_ 5 #ifndef UI_WM_CORE_CAPTURE_CONTROLLER_H_
6 #define UI_VIEWS_COREWM_CAPTURE_CONTROLLER_H_ 6 #define UI_WM_CORE_CAPTURE_CONTROLLER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "ui/aura/client/capture_client.h" 12 #include "ui/aura/client/capture_client.h"
13 #include "ui/aura/window_observer.h" 13 #include "ui/aura/window_observer.h"
14 #include "ui/views/views_export.h" 14 #include "ui/wm/core/wm_core_export.h"
15 15
16 namespace views { 16 namespace views {
17 namespace corewm { 17 namespace corewm {
18 18
19 // Internal CaptureClient implementation. See ScopedCaptureClient for details. 19 // Internal CaptureClient implementation. See ScopedCaptureClient for details.
20 class VIEWS_EXPORT CaptureController : public aura::client::CaptureClient { 20 class WM_CORE_EXPORT CaptureController : public aura::client::CaptureClient {
21 public: 21 public:
22 // Adds |root| to the list of RootWindows notified when capture changes. 22 // Adds |root| to the list of RootWindows notified when capture changes.
23 void Attach(aura::Window* root); 23 void Attach(aura::Window* root);
24 24
25 // Removes |root| from the list of RootWindows notified when capture changes. 25 // Removes |root| from the list of RootWindows notified when capture changes.
26 void Detach(aura::Window* root); 26 void Detach(aura::Window* root);
27 27
28 // Returns true if this CaptureController is installed on at least one 28 // Returns true if this CaptureController is installed on at least one
29 // RootWindow. 29 // RootWindow.
30 bool is_active() const { return !root_windows_.empty(); } 30 bool is_active() const { return !root_windows_.empty(); }
(...skipping 16 matching lines...) Expand all
47 47
48 // Set of RootWindows notified when capture changes. 48 // Set of RootWindows notified when capture changes.
49 RootWindows root_windows_; 49 RootWindows root_windows_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(CaptureController); 51 DISALLOW_COPY_AND_ASSIGN(CaptureController);
52 }; 52 };
53 53
54 // ScopedCaptureClient is responsible for creating a CaptureClient for a 54 // ScopedCaptureClient is responsible for creating a CaptureClient for a
55 // RootWindow. Specifically it creates a single CaptureController that is shared 55 // RootWindow. Specifically it creates a single CaptureController that is shared
56 // among all ScopedCaptureClients and adds the RootWindow to it. 56 // among all ScopedCaptureClients and adds the RootWindow to it.
57 class VIEWS_EXPORT ScopedCaptureClient : public aura::WindowObserver { 57 class WM_CORE_EXPORT ScopedCaptureClient : public aura::WindowObserver {
58 public: 58 public:
59 explicit ScopedCaptureClient(aura::Window* root); 59 explicit ScopedCaptureClient(aura::Window* root);
60 virtual ~ScopedCaptureClient(); 60 virtual ~ScopedCaptureClient();
61 61
62 // Returns true if there is a CaptureController with at least one RootWindow. 62 // Returns true if there is a CaptureController with at least one RootWindow.
63 static bool IsActive(); 63 static bool IsActive();
64 64
65 aura::client::CaptureClient* capture_client() { 65 aura::client::CaptureClient* capture_client() {
66 return capture_controller_; 66 return capture_controller_;
67 } 67 }
(...skipping 10 matching lines...) Expand all
78 78
79 // RootWindow this ScopedCaptureClient was create for. 79 // RootWindow this ScopedCaptureClient was create for.
80 aura::Window* root_window_; 80 aura::Window* root_window_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(ScopedCaptureClient); 82 DISALLOW_COPY_AND_ASSIGN(ScopedCaptureClient);
83 }; 83 };
84 84
85 } // namespace corewm 85 } // namespace corewm
86 } // namespace views 86 } // namespace views
87 87
88 #endif // UI_VIEWS_COREWM_CAPTURE_CONTROLLER_H_ 88 #endif // UI_WM_CORE_CAPTURE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/wm/core/base_focus_rules.cc ('k') | ui/wm/core/capture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698