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

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

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

Powered by Google App Engine
This is Rietveld 408576698