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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_capture_client.h

Issue 2652033003: Change ImmersiveContextMus to use DesktopCaptureClient. (Closed)
Patch Set: doc and auto Created 3 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 19 matching lines...) Expand all
30 // capture knows which window has capture. All others think no one has 30 // capture knows which window has capture. All others think no one has
31 // capture. This behavior is necessitated by Windows occassionally delivering 31 // capture. This behavior is necessitated by Windows occassionally delivering
32 // mouse events to a window other than the capture window and expecting that 32 // mouse events to a window other than the capture window and expecting that
33 // window to get the event. If we shared the capture window on the desktop this 33 // window to get the event. If we shared the capture window on the desktop this
34 // behavior would not be possible. 34 // behavior would not be possible.
35 class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient { 35 class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient {
36 public: 36 public:
37 explicit DesktopCaptureClient(aura::Window* root); 37 explicit DesktopCaptureClient(aura::Window* root);
38 ~DesktopCaptureClient() override; 38 ~DesktopCaptureClient() override;
39 39
40 // Exactly the same as GetGlobalCaptureWindow() but static.
41 static aura::Window* GetCaptureWindowGlobal();
42
40 // Overridden from aura::client::CaptureClient: 43 // Overridden from aura::client::CaptureClient:
41 void SetCapture(aura::Window* window) override; 44 void SetCapture(aura::Window* window) override;
42 void ReleaseCapture(aura::Window* window) override; 45 void ReleaseCapture(aura::Window* window) override;
43 aura::Window* GetCaptureWindow() override; 46 aura::Window* GetCaptureWindow() override;
44 aura::Window* GetGlobalCaptureWindow() override; 47 aura::Window* GetGlobalCaptureWindow() override;
45 void AddObserver(aura::client::CaptureClientObserver* observer) override; 48 void AddObserver(aura::client::CaptureClientObserver* observer) override;
46 void RemoveObserver(aura::client::CaptureClientObserver* observer) override; 49 void RemoveObserver(aura::client::CaptureClientObserver* observer) override;
47 50
48 private: 51 private:
49 typedef std::set<DesktopCaptureClient*> CaptureClients; 52 typedef std::set<DesktopCaptureClient*> CaptureClients;
50 53
51 aura::Window* root_; 54 aura::Window* root_;
52 aura::Window* capture_window_; 55 aura::Window* capture_window_;
53 56
54 // Set of DesktopCaptureClients. 57 // Set of DesktopCaptureClients.
55 static CaptureClients* capture_clients_; 58 static CaptureClients* capture_clients_;
56 59
57 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); 60 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient);
58 }; 61 };
59 62
60 } // namespace views 63 } // namespace views
61 64
62 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ 65 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698