| 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 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> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual void SetViewportSize(const gfx::Size& size) = 0; | 41 virtual void SetViewportSize(const gfx::Size& size) = 0; |
| 42 | 42 |
| 43 virtual void SetTitle(const base::string16& title) = 0; | 43 virtual void SetTitle(const base::string16& title) = 0; |
| 44 | 44 |
| 45 virtual void SetCapture() = 0; | 45 virtual void SetCapture() = 0; |
| 46 | 46 |
| 47 virtual void ReleaseCapture() = 0; | 47 virtual void ReleaseCapture() = 0; |
| 48 | 48 |
| 49 virtual void SetCursor(const ui::CursorData& cursor) = 0; | 49 virtual void SetCursor(const ui::CursorData& cursor) = 0; |
| 50 | 50 |
| 51 virtual void MoveCursorTo(const gfx::Point& window_pixel_location) = 0; |
| 52 |
| 51 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; | 53 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; |
| 52 virtual void SetImeVisibility(bool visible) = 0; | 54 virtual void SetImeVisibility(bool visible) = 0; |
| 53 | 55 |
| 54 // Updates the viewport metrics for the display. | 56 // Updates the viewport metrics for the display. |
| 55 virtual void UpdateViewportMetrics( | 57 virtual void UpdateViewportMetrics( |
| 56 const display::ViewportMetrics& metrics) = 0; | 58 const display::ViewportMetrics& metrics) = 0; |
| 57 | 59 |
| 58 // Returns the AcceleratedWidget associated with the Display. It can return | 60 // Returns the AcceleratedWidget associated with the Display. It can return |
| 59 // kNullAcceleratedWidget if the accelerated widget is not available yet. | 61 // kNullAcceleratedWidget if the accelerated widget is not available yet. |
| 60 virtual gfx::AcceleratedWidget GetAcceleratedWidget() const = 0; | 62 virtual gfx::AcceleratedWidget GetAcceleratedWidget() const = 0; |
| 61 | 63 |
| 62 virtual FrameGenerator* GetFrameGenerator() = 0; | 64 virtual FrameGenerator* GetFrameGenerator() = 0; |
| 63 | 65 |
| 64 // Overrides factory for testing. Default (NULL) value indicates regular | 66 // Overrides factory for testing. Default (NULL) value indicates regular |
| 65 // (non-test) environment. | 67 // (non-test) environment. |
| 66 static void set_factory_for_testing(PlatformDisplayFactory* factory) { | 68 static void set_factory_for_testing(PlatformDisplayFactory* factory) { |
| 67 PlatformDisplay::factory_ = factory; | 69 PlatformDisplay::factory_ = factory; |
| 68 } | 70 } |
| 69 | 71 |
| 70 private: | 72 private: |
| 71 // Static factory instance (always NULL for non-test). | 73 // Static factory instance (always NULL for non-test). |
| 72 static PlatformDisplayFactory* factory_; | 74 static PlatformDisplayFactory* factory_; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 | 77 |
| 76 } // namespace ws | 78 } // namespace ws |
| 77 } // namespace ui | 79 } // namespace ui |
| 78 | 80 |
| 79 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ | 81 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ |
| OLD | NEW |