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/aura/window_tree_host_platform.h" | 5 #include "ui/aura/window_tree_host_platform.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #endif | 52 #endif |
53 } | 53 } |
54 | 54 |
55 WindowTreeHostPlatform::WindowTreeHostPlatform() | 55 WindowTreeHostPlatform::WindowTreeHostPlatform() |
56 : WindowTreeHostPlatform(nullptr) {} | 56 : WindowTreeHostPlatform(nullptr) {} |
57 | 57 |
58 WindowTreeHostPlatform::WindowTreeHostPlatform( | 58 WindowTreeHostPlatform::WindowTreeHostPlatform( |
59 std::unique_ptr<WindowPort> window_port) | 59 std::unique_ptr<WindowPort> window_port) |
60 : WindowTreeHost(std::move(window_port)), | 60 : WindowTreeHost(std::move(window_port)), |
61 widget_(gfx::kNullAcceleratedWidget), | 61 widget_(gfx::kNullAcceleratedWidget), |
62 current_cursor_(ui::kCursorNull) { | 62 current_cursor_(ui::CursorType::kNull) {} |
63 } | |
64 | 63 |
65 void WindowTreeHostPlatform::SetPlatformWindow( | 64 void WindowTreeHostPlatform::SetPlatformWindow( |
66 std::unique_ptr<ui::PlatformWindow> window) { | 65 std::unique_ptr<ui::PlatformWindow> window) { |
67 platform_window_ = std::move(window); | 66 platform_window_ = std::move(window); |
68 } | 67 } |
69 | 68 |
70 WindowTreeHostPlatform::~WindowTreeHostPlatform() { | 69 WindowTreeHostPlatform::~WindowTreeHostPlatform() { |
71 DestroyCompositor(); | 70 DestroyCompositor(); |
72 DestroyDispatcher(); | 71 DestroyDispatcher(); |
73 platform_window_->Close(); | 72 platform_window_->Close(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 DCHECK_EQ(widget, widget_); | 184 DCHECK_EQ(widget, widget_); |
186 widget_ = gfx::kNullAcceleratedWidget; | 185 widget_ = gfx::kNullAcceleratedWidget; |
187 } | 186 } |
188 | 187 |
189 void WindowTreeHostPlatform::OnActivationChanged(bool active) { | 188 void WindowTreeHostPlatform::OnActivationChanged(bool active) { |
190 if (active) | 189 if (active) |
191 OnHostActivated(); | 190 OnHostActivated(); |
192 } | 191 } |
193 | 192 |
194 } // namespace aura | 193 } // namespace aura |
OLD | NEW |