OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
| 6 #define ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/gfx/point.h" |
| 13 |
| 14 namespace aura { |
| 15 class RootWindow; |
| 16 class Window; |
| 17 } |
| 18 |
| 19 namespace ash { |
| 20 namespace test{ |
| 21 class MirrorWindowTestApi; |
| 22 } |
| 23 |
| 24 namespace internal { |
| 25 class DisplayInfo; |
| 26 class CursorWindowDelegate; |
| 27 |
| 28 // An object that copies the content of the primary root window to a |
| 29 // mirror window. This also draws a mouse cursor as the mouse cursor |
| 30 // is typically drawn by the window system. |
| 31 class MirrorWindowController { |
| 32 public: |
| 33 MirrorWindowController(); |
| 34 ~MirrorWindowController(); |
| 35 |
| 36 // Updates the root window's bounds using |display_info|. |
| 37 // Creates the new root window if one doesn't exist. |
| 38 void UpdateWindow(const DisplayInfo& display_info); |
| 39 |
| 40 void Close(); |
| 41 |
| 42 // Updates the mirrored cursor location,shape and |
| 43 // visibility. |
| 44 void UpdateCursorLocation(); |
| 45 void SetMirroredCursor(gfx::NativeCursor cursor); |
| 46 void SetMirroredCursorVisibility(bool visible); |
| 47 |
| 48 private: |
| 49 friend class test::MirrorWindowTestApi; |
| 50 |
| 51 int current_cursor_type_; |
| 52 aura::Window* cursor_window_; // owned by root window. |
| 53 scoped_ptr<aura::RootWindow> root_window_; |
| 54 scoped_ptr<CursorWindowDelegate> cursor_window_delegate_; |
| 55 gfx::Point hot_point_; |
| 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(MirrorWindowController); |
| 58 }; |
| 59 |
| 60 } // namespace internal |
| 61 } // namespace ash |
| 62 |
| 63 #endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_ |
OLD | NEW |