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 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/base/cursor/cursor.h" | 10 #include "ui/base/cursor/cursor.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 } | 14 } |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 | 17 |
18 class PlatformImeController; | 18 class PlatformImeController; |
19 class PlatformWindowDelegate; | 19 class PlatformWindowDelegate; |
20 | 20 |
21 // Platform window. | 21 // Platform window. |
22 // | 22 // |
23 // Each instance of PlatformWindow represents a single window in the | 23 // Each instance of PlatformWindow represents a single window in the |
24 // underlying platform windowing system (i.e. X11/Win/OSX). | 24 // underlying platform windowing system (i.e. X11/Win/OSX). |
25 class PlatformWindow { | 25 class PlatformWindow { |
26 public: | 26 public: |
27 static scoped_ptr<PlatformWindow> Create(PlatformWindowDelegate* delegate, | |
mfomitchev
2015/10/08 15:03:27
IMHO it's better just to do an ifdef in the constr
no sievers
2015/10/09 00:34:18
Done. For non-Ozone I left it with the implementat
mfomitchev
2015/10/09 13:56:54
Do you mean just in the header files? The Aura mod
no sievers
2015/10/09 20:47:46
Done.
| |
28 const gfx::Rect& bounds); | |
27 virtual ~PlatformWindow() {} | 29 virtual ~PlatformWindow() {} |
28 | 30 |
29 virtual void Show() = 0; | 31 virtual void Show() = 0; |
30 virtual void Hide() = 0; | 32 virtual void Hide() = 0; |
31 virtual void Close() = 0; | 33 virtual void Close() = 0; |
32 | 34 |
33 // Sets and gets the bounds of the platform-window. Note that the bounds is in | 35 // Sets and gets the bounds of the platform-window. Note that the bounds is in |
34 // physical pixel coordinates. | 36 // physical pixel coordinates. |
35 virtual void SetBounds(const gfx::Rect& bounds) = 0; | 37 virtual void SetBounds(const gfx::Rect& bounds) = 0; |
36 virtual gfx::Rect GetBounds() = 0; | 38 virtual gfx::Rect GetBounds() = 0; |
(...skipping 18 matching lines...) Expand all Loading... | |
55 virtual void ConfineCursorToBounds(const gfx::Rect& bounds) = 0; | 57 virtual void ConfineCursorToBounds(const gfx::Rect& bounds) = 0; |
56 | 58 |
57 // The PlatformImeController is owned by the PlatformWindow, the ownership is | 59 // The PlatformImeController is owned by the PlatformWindow, the ownership is |
58 // not transferred. | 60 // not transferred. |
59 virtual PlatformImeController* GetPlatformImeController() = 0; | 61 virtual PlatformImeController* GetPlatformImeController() = 0; |
60 }; | 62 }; |
61 | 63 |
62 } // namespace ui | 64 } // namespace ui |
63 | 65 |
64 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ | 66 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_H_ |
OLD | NEW |