| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ |
| 6 #define ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ | 6 #define ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Updates the container window for the cursor window controller. | 43 // Updates the container window for the cursor window controller. |
| 44 void UpdateContainer(); | 44 void UpdateContainer(); |
| 45 | 45 |
| 46 // Sets the display on which to draw cursor. | 46 // Sets the display on which to draw cursor. |
| 47 // Only applicable when cursor compositing is enabled. | 47 // Only applicable when cursor compositing is enabled. |
| 48 void SetDisplay(const display::Display& display); | 48 void SetDisplay(const display::Display& display); |
| 49 | 49 |
| 50 // Sets cursor location, shape, set and visibility. | 50 // Sets cursor location, shape, set and visibility. |
| 51 void UpdateLocation(); | 51 void UpdateLocation(); |
| 52 void SetCursor(gfx::NativeCursor cursor); | 52 void SetCursor(gfx::NativeCursor cursor); |
| 53 void SetCursorSet(ui::CursorSetType); | 53 void SetCursorSize(ui::CursorSize cursor_size); |
| 54 void SetVisibility(bool visible); | 54 void SetVisibility(bool visible); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 friend class CursorWindowControllerTest; | 57 friend class CursorWindowControllerTest; |
| 58 friend class test::MirrorWindowTestApi; | 58 friend class test::MirrorWindowTestApi; |
| 59 | 59 |
| 60 // Sets the container window for the cursor window controller. | 60 // Sets the container window for the cursor window controller. |
| 61 // Closes the cursor window if |container| is NULL. | 61 // Closes the cursor window if |container| is NULL. |
| 62 void SetContainer(aura::Window* container); | 62 void SetContainer(aura::Window* container); |
| 63 | 63 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 77 | 77 |
| 78 // The bounds of the container in screen coordinates. | 78 // The bounds of the container in screen coordinates. |
| 79 gfx::Rect bounds_in_screen_; | 79 gfx::Rect bounds_in_screen_; |
| 80 | 80 |
| 81 // The native_type of the cursor, see definitions in cursor.h | 81 // The native_type of the cursor, see definitions in cursor.h |
| 82 ui::CursorType cursor_type_; | 82 ui::CursorType cursor_type_; |
| 83 | 83 |
| 84 // The last requested cursor visibility. | 84 // The last requested cursor visibility. |
| 85 bool visible_; | 85 bool visible_; |
| 86 | 86 |
| 87 ui::CursorSetType cursor_set_; | 87 ui::CursorSize cursor_size_; |
| 88 gfx::Point hot_point_; | 88 gfx::Point hot_point_; |
| 89 | 89 |
| 90 int large_cursor_size_in_dip_; | 90 int large_cursor_size_in_dip_; |
| 91 | 91 |
| 92 // The display on which the cursor is drawn. | 92 // The display on which the cursor is drawn. |
| 93 // For mirroring mode, the display is always the primary display. | 93 // For mirroring mode, the display is always the primary display. |
| 94 display::Display display_; | 94 display::Display display_; |
| 95 | 95 |
| 96 std::unique_ptr<aura::Window> cursor_window_; | 96 std::unique_ptr<aura::Window> cursor_window_; |
| 97 std::unique_ptr<CursorWindowDelegate> delegate_; | 97 std::unique_ptr<CursorWindowDelegate> delegate_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(CursorWindowController); | 99 DISALLOW_COPY_AND_ASSIGN(CursorWindowController); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace ash | 102 } // namespace ash |
| 103 | 103 |
| 104 #endif // ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ | 104 #endif // ASH_DISPLAY_CURSOR_WINDOW_CONTROLLER_H_ |
| OLD | NEW |