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_STUB_STUB_WINDOW_H_ | 5 #ifndef UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_ |
6 #define UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_ | 6 #define UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
11 #include "ui/platform_window/platform_window.h" | 11 #include "ui/platform_window/platform_window.h" |
12 #include "ui/platform_window/stub/stub_window_export.h" | 12 #include "ui/platform_window/stub/stub_window_export.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 class PlatformWindowDelegate; | 16 class PlatformWindowDelegate; |
17 | 17 |
18 class STUB_WINDOW_EXPORT StubWindow : NON_EXPORTED_BASE(public PlatformWindow) { | 18 class STUB_WINDOW_EXPORT StubWindow : NON_EXPORTED_BASE(public PlatformWindow) { |
19 public: | 19 public: |
20 StubWindow(PlatformWindowDelegate* delegate, | 20 explicit StubWindow(PlatformWindowDelegate* delegate, |
21 bool use_default_accelerated_widget = true); | 21 bool use_default_accelerated_widget = true, |
| 22 const gfx::Rect& bounds = gfx::Rect()); |
22 ~StubWindow() override; | 23 ~StubWindow() override; |
23 | 24 |
24 private: | 25 private: |
25 // PlatformWindow: | 26 // PlatformWindow: |
26 void Show() override; | 27 void Show() override; |
27 void Hide() override; | 28 void Hide() override; |
28 void Close() override; | 29 void Close() override; |
29 void PrepareForShutdown() override; | 30 void PrepareForShutdown() override; |
30 void SetBounds(const gfx::Rect& bounds) override; | 31 void SetBounds(const gfx::Rect& bounds) override; |
31 gfx::Rect GetBounds() override; | 32 gfx::Rect GetBounds() override; |
(...skipping 11 matching lines...) Expand all Loading... |
43 | 44 |
44 PlatformWindowDelegate* delegate_; | 45 PlatformWindowDelegate* delegate_; |
45 gfx::Rect bounds_; | 46 gfx::Rect bounds_; |
46 | 47 |
47 DISALLOW_COPY_AND_ASSIGN(StubWindow); | 48 DISALLOW_COPY_AND_ASSIGN(StubWindow); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace ui | 51 } // namespace ui |
51 | 52 |
52 #endif // UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_ | 53 #endif // UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_ |
OLD | NEW |