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

Side by Side Diff: services/ui/ws/platform_display.h

Issue 2949353003: Implement large cursors in Mushrome. (Closed)
Patch Set: rename everything to CursorSize Created 3 years, 6 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
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/platform_display_default.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "services/ui/display/viewport_metrics.h" 14 #include "services/ui/display/viewport_metrics.h"
15 #include "services/ui/public/interfaces/cursor/cursor.mojom.h" 15 #include "services/ui/public/interfaces/cursor/cursor.mojom.h"
16 #include "ui/events/event_source.h" 16 #include "ui/events/event_source.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 18
19 namespace ui { 19 namespace ui {
20 20
21 enum class CursorSize;
21 struct TextInputState; 22 struct TextInputState;
22 23
23 namespace ws { 24 namespace ws {
24 25
25 class FrameGenerator; 26 class FrameGenerator;
26 class PlatformDisplayDelegate; 27 class PlatformDisplayDelegate;
27 class PlatformDisplayFactory; 28 class PlatformDisplayFactory;
28 class ServerWindow; 29 class ServerWindow;
29 30
30 // PlatformDisplay is used to connect the root ServerWindow to a display. 31 // PlatformDisplay is used to connect the root ServerWindow to a display.
(...skipping 12 matching lines...) Expand all
43 virtual void SetTitle(const base::string16& title) = 0; 44 virtual void SetTitle(const base::string16& title) = 0;
44 45
45 virtual void SetCapture() = 0; 46 virtual void SetCapture() = 0;
46 47
47 virtual void ReleaseCapture() = 0; 48 virtual void ReleaseCapture() = 0;
48 49
49 virtual void SetCursor(const ui::CursorData& cursor) = 0; 50 virtual void SetCursor(const ui::CursorData& cursor) = 0;
50 51
51 virtual void MoveCursorTo(const gfx::Point& window_pixel_location) = 0; 52 virtual void MoveCursorTo(const gfx::Point& window_pixel_location) = 0;
52 53
54 virtual void SetCursorSize(const ui::CursorSize& cursor_size) = 0;
55
53 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; 56 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0;
54 virtual void SetImeVisibility(bool visible) = 0; 57 virtual void SetImeVisibility(bool visible) = 0;
55 58
56 // Updates the viewport metrics for the display. 59 // Updates the viewport metrics for the display.
57 virtual void UpdateViewportMetrics( 60 virtual void UpdateViewportMetrics(
58 const display::ViewportMetrics& metrics) = 0; 61 const display::ViewportMetrics& metrics) = 0;
59 62
60 // Returns the AcceleratedWidget associated with the Display. It can return 63 // Returns the AcceleratedWidget associated with the Display. It can return
61 // kNullAcceleratedWidget if the accelerated widget is not available yet. 64 // kNullAcceleratedWidget if the accelerated widget is not available yet.
62 virtual gfx::AcceleratedWidget GetAcceleratedWidget() const = 0; 65 virtual gfx::AcceleratedWidget GetAcceleratedWidget() const = 0;
63 66
64 virtual FrameGenerator* GetFrameGenerator() = 0; 67 virtual FrameGenerator* GetFrameGenerator() = 0;
65 68
66 // Overrides factory for testing. Default (NULL) value indicates regular 69 // Overrides factory for testing. Default (NULL) value indicates regular
67 // (non-test) environment. 70 // (non-test) environment.
68 static void set_factory_for_testing(PlatformDisplayFactory* factory) { 71 static void set_factory_for_testing(PlatformDisplayFactory* factory) {
69 PlatformDisplay::factory_ = factory; 72 PlatformDisplay::factory_ = factory;
70 } 73 }
71 74
72 private: 75 private:
73 // Static factory instance (always NULL for non-test). 76 // Static factory instance (always NULL for non-test).
74 static PlatformDisplayFactory* factory_; 77 static PlatformDisplayFactory* factory_;
75 }; 78 };
76 79
77 80
78 } // namespace ws 81 } // namespace ws
79 } // namespace ui 82 } // namespace ui
80 83
81 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 84 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/platform_display_default.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698