Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 static aura::Window* GetCaptureWindowGlobal(); | |
|
sky
2017/01/24 23:06:08
This name is ick! How about instead adding a funct
sadrul
2017/01/25 01:02:13
I believe the issue is that DesktopCaptureClient i
sky
2017/01/25 04:47:48
D'OH! You are certainly right. As I can't think of
| |
| 41 | |
| 40 // Overridden from aura::client::CaptureClient: | 42 // Overridden from aura::client::CaptureClient: |
| 41 void SetCapture(aura::Window* window) override; | 43 void SetCapture(aura::Window* window) override; |
| 42 void ReleaseCapture(aura::Window* window) override; | 44 void ReleaseCapture(aura::Window* window) override; |
| 43 aura::Window* GetCaptureWindow() override; | 45 aura::Window* GetCaptureWindow() override; |
| 44 aura::Window* GetGlobalCaptureWindow() override; | 46 aura::Window* GetGlobalCaptureWindow() override; |
| 45 void AddObserver(aura::client::CaptureClientObserver* observer) override; | 47 void AddObserver(aura::client::CaptureClientObserver* observer) override; |
| 46 void RemoveObserver(aura::client::CaptureClientObserver* observer) override; | 48 void RemoveObserver(aura::client::CaptureClientObserver* observer) override; |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 typedef std::set<DesktopCaptureClient*> CaptureClients; | 51 typedef std::set<DesktopCaptureClient*> CaptureClients; |
| 50 | 52 |
| 51 aura::Window* root_; | 53 aura::Window* root_; |
| 52 aura::Window* capture_window_; | 54 aura::Window* capture_window_; |
| 53 | 55 |
| 54 // Set of DesktopCaptureClients. | 56 // Set of DesktopCaptureClients. |
| 55 static CaptureClients* capture_clients_; | 57 static CaptureClients* capture_clients_; |
| 56 | 58 |
| 57 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); | 59 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace views | 62 } // namespace views |
| 61 | 63 |
| 62 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ | 64 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ |
| OLD | NEW |