| 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 UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ | 5 #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ |
| 6 #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ | 6 #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 class Rect; | 11 class Rect; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 #if defined(USE_X11) | 16 #if defined(USE_X11) |
| 17 typedef unsigned long PlatformCursor; | 17 typedef unsigned long PlatformCursor; |
| 18 #else | 18 #else |
| 19 typedef void* PlatformCursor; | 19 typedef void* PlatformCursor; |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 | 22 |
| 23 class PlatformWindowDelegate; | 23 class PlatformWindowDelegate; |
| 24 | 24 |
| 25 // Platform window. | 25 // Platform window. |
| 26 // | 26 // |
| 27 // Each instance of PlatformWindow represents a single window in the | 27 // Each instance of PlatformWindow represents a single window in the |
| 28 // underlying platform windowing system (i.e. X11/Win/OSX). | 28 // underlying platform windowing system (i.e. X11/Win/OSX). |
| 29 class PlatformWindow { | 29 class PlatformWindow { |
| 30 public: | 30 public: |
| 31 virtual ~PlatformWindow() {} | 31 virtual ~PlatformWindow() {} |
| (...skipping 21 matching lines...) Expand all Loading... |
| 53 virtual void MoveCursorTo(const gfx::Point& location) = 0; | 53 virtual void MoveCursorTo(const gfx::Point& location) = 0; |
| 54 | 54 |
| 55 // Confines the cursor to |bounds| when it is in the platform window. |bounds| | 55 // Confines the cursor to |bounds| when it is in the platform window. |bounds| |
| 56 // is in platform window coordinates. | 56 // is in platform window coordinates. |
| 57 virtual void ConfineCursorToBounds(const gfx::Rect& bounds) = 0; | 57 virtual void ConfineCursorToBounds(const gfx::Rect& bounds) = 0; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace ui | 60 } // namespace ui |
| 61 | 61 |
| 62 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ | 62 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ |
| OLD | NEW |