| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "ui/base/cursor/cursor.h" | 11 #include "ui/base/cursor/cursor.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class Rect; | 14 class Rect; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 | 18 |
| 19 class PlatformImeController; | 19 class PlatformImeController; |
| 20 class PlatformWindowDelegate; | 20 class PlatformWindowDelegate; |
| 21 | 21 |
| 22 // Platform window. | 22 // Platform window. |
| 23 // | 23 // |
| 24 // Each instance of PlatformWindow represents a single window in the | 24 // Each instance of PlatformWindow represents a single window in the |
| 25 // underlying platform windowing system (i.e. X11/Win/OSX). | 25 // underlying platform windowing system (i.e. X11/Win/OSX/Android). |
| 26 class PlatformWindow { | 26 class PlatformWindow { |
| 27 public: | 27 public: |
| 28 virtual ~PlatformWindow() {} | 28 virtual ~PlatformWindow() {} |
| 29 | 29 |
| 30 virtual void Show() = 0; | 30 virtual void Show() = 0; |
| 31 virtual void Hide() = 0; | 31 virtual void Hide() = 0; |
| 32 virtual void Close() = 0; | 32 virtual void Close() = 0; |
| 33 | 33 |
| 34 // Sets and gets the bounds of the platform-window. Note that the bounds is in | 34 // Sets and gets the bounds of the platform-window. Note that the bounds is in |
| 35 // physical pixel coordinates. | 35 // physical pixel coordinates. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 56 virtual void ConfineCursorToBounds(const gfx::Rect& bounds) = 0; | 56 virtual void ConfineCursorToBounds(const gfx::Rect& bounds) = 0; |
| 57 | 57 |
| 58 // The PlatformImeController is owned by the PlatformWindow, the ownership is | 58 // The PlatformImeController is owned by the PlatformWindow, the ownership is |
| 59 // not transferred. | 59 // not transferred. |
| 60 virtual PlatformImeController* GetPlatformImeController() = 0; | 60 virtual PlatformImeController* GetPlatformImeController() = 0; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace ui | 63 } // namespace ui |
| 64 | 64 |
| 65 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ | 65 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ |
| OLD | NEW |