| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #endif | 50 #endif |
| 51 } | 51 } |
| 52 | 52 |
| 53 WindowTreeHostPlatform::WindowTreeHostPlatform() | 53 WindowTreeHostPlatform::WindowTreeHostPlatform() |
| 54 : widget_(gfx::kNullAcceleratedWidget), | 54 : widget_(gfx::kNullAcceleratedWidget), |
| 55 current_cursor_(ui::kCursorNull) { | 55 current_cursor_(ui::kCursorNull) { |
| 56 CreateCompositor(); | 56 CreateCompositor(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void WindowTreeHostPlatform::SetPlatformWindow( | 59 void WindowTreeHostPlatform::SetPlatformWindow( |
| 60 scoped_ptr<ui::PlatformWindow> window) { | 60 std::unique_ptr<ui::PlatformWindow> window) { |
| 61 window_ = std::move(window); | 61 window_ = std::move(window); |
| 62 } | 62 } |
| 63 | 63 |
| 64 WindowTreeHostPlatform::~WindowTreeHostPlatform() { | 64 WindowTreeHostPlatform::~WindowTreeHostPlatform() { |
| 65 DestroyCompositor(); | 65 DestroyCompositor(); |
| 66 DestroyDispatcher(); | 66 DestroyDispatcher(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 ui::EventSource* WindowTreeHostPlatform::GetEventSource() { | 69 ui::EventSource* WindowTreeHostPlatform::GetEventSource() { |
| 70 return this; | 70 return this; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 DCHECK_EQ(widget, widget_); | 179 DCHECK_EQ(widget, widget_); |
| 180 widget_ = gfx::kNullAcceleratedWidget; | 180 widget_ = gfx::kNullAcceleratedWidget; |
| 181 } | 181 } |
| 182 | 182 |
| 183 void WindowTreeHostPlatform::OnActivationChanged(bool active) { | 183 void WindowTreeHostPlatform::OnActivationChanged(bool active) { |
| 184 if (active) | 184 if (active) |
| 185 OnHostActivated(); | 185 OnHostActivated(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace aura | 188 } // namespace aura |
| OLD | NEW |