OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ui/platform_window/stub/stub_window.h" | 5 #include "ui/platform_window/stub/stub_window.h" |
6 | 6 |
7 #include "ui/platform_window/platform_window_delegate.h" | 7 #include "ui/platform_window/platform_window_delegate.h" |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
| 11 // static |
| 12 scoped_ptr<PlatformWindow> PlatformWindow::Create( |
| 13 PlatformWindowDelegate* delegate, |
| 14 const gfx::Rect& bounds) { |
| 15 return new StubWindow(delegate); |
| 16 } |
| 17 |
11 StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) { | 18 StubWindow::StubWindow(PlatformWindowDelegate* delegate) : delegate_(delegate) { |
12 delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f); | 19 delegate_->OnAcceleratedWidgetAvailable(gfx::kNullAcceleratedWidget, 1.f); |
13 } | 20 } |
14 | 21 |
15 StubWindow::~StubWindow() { | 22 StubWindow::~StubWindow() { |
16 } | 23 } |
17 | 24 |
18 void StubWindow::Show() { | 25 void StubWindow::Show() { |
19 } | 26 } |
20 | 27 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 70 } |
64 | 71 |
65 void StubWindow::ConfineCursorToBounds(const gfx::Rect& bounds) { | 72 void StubWindow::ConfineCursorToBounds(const gfx::Rect& bounds) { |
66 } | 73 } |
67 | 74 |
68 PlatformImeController* StubWindow::GetPlatformImeController() { | 75 PlatformImeController* StubWindow::GetPlatformImeController() { |
69 return nullptr; | 76 return nullptr; |
70 } | 77 } |
71 | 78 |
72 } // namespace ui | 79 } // namespace ui |
OLD | NEW |