| 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/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/views/views_export.h" | 13 #include "ui/views/views_export.h" |
| 14 | 14 |
| 15 namespace aura { |
| 16 class RootWindow; |
| 17 } |
| 18 |
| 15 namespace views { | 19 namespace views { |
| 16 | 20 |
| 17 // Desktop implementation of CaptureClient. There is one CaptureClient per | 21 // Desktop implementation of CaptureClient. There is one CaptureClient per |
| 18 // DesktopNativeWidgetAura. | 22 // DesktopNativeWidgetAura. |
| 19 class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient { | 23 class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient { |
| 20 public: | 24 public: |
| 21 explicit DesktopCaptureClient(aura::RootWindow* root); | 25 explicit DesktopCaptureClient(aura::RootWindow* root); |
| 22 virtual ~DesktopCaptureClient(); | 26 virtual ~DesktopCaptureClient(); |
| 23 | 27 |
| 24 // Overridden from aura::client::CaptureClient: | 28 // Overridden from aura::client::CaptureClient: |
| 25 virtual void SetCapture(aura::Window* window) OVERRIDE; | 29 virtual void SetCapture(aura::Window* window) OVERRIDE; |
| 26 virtual void ReleaseCapture(aura::Window* window) OVERRIDE; | 30 virtual void ReleaseCapture(aura::Window* window) OVERRIDE; |
| 27 virtual aura::Window* GetCaptureWindow() OVERRIDE; | 31 virtual aura::Window* GetCaptureWindow() OVERRIDE; |
| 28 | 32 |
| 29 private: | 33 private: |
| 30 typedef std::set<aura::RootWindow*> Roots; | 34 typedef std::set<aura::RootWindow*> Roots; |
| 31 | 35 |
| 32 aura::RootWindow* root_; | 36 aura::RootWindow* root_; |
| 33 aura::Window* capture_window_; | 37 aura::Window* capture_window_; |
| 34 | 38 |
| 35 // Set of RootWindows DesktopCaptureClient has been created for. | 39 // Set of RootWindows DesktopCaptureClient has been created for. |
| 36 static Roots* roots_; | 40 static Roots* roots_; |
| 37 | 41 |
| 38 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); | 42 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient); |
| 39 }; | 43 }; |
| 40 | 44 |
| 41 } // namespace views | 45 } // namespace views |
| 42 | 46 |
| 43 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ | 47 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_CAPTURE_CLIENT_H_ |
| OLD | NEW |