| 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 "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "ui/aura/window_event_dispatcher.h" | 8 #include "ui/aura/window_event_dispatcher.h" |
| 9 #include "ui/compositor/compositor.h" | 9 #include "ui/compositor/compositor.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #elif defined(OS_ANDROID) | 44 #elif defined(OS_ANDROID) |
| 45 window_.reset(new ui::PlatformWindowAndroid(this)); | 45 window_.reset(new ui::PlatformWindowAndroid(this)); |
| 46 #else | 46 #else |
| 47 NOTIMPLEMENTED(); | 47 NOTIMPLEMENTED(); |
| 48 #endif | 48 #endif |
| 49 } | 49 } |
| 50 | 50 |
| 51 WindowTreeHostPlatform::WindowTreeHostPlatform() | 51 WindowTreeHostPlatform::WindowTreeHostPlatform() |
| 52 : widget_(gfx::kNullAcceleratedWidget), | 52 : widget_(gfx::kNullAcceleratedWidget), |
| 53 current_cursor_(ui::kCursorNull), | 53 current_cursor_(ui::kCursorNull), |
| 54 has_capture_(false) {} | 54 has_capture_(false) { |
| 55 CreateCompositor(); |
| 56 } |
| 55 | 57 |
| 56 void WindowTreeHostPlatform::SetPlatformWindow( | 58 void WindowTreeHostPlatform::SetPlatformWindow( |
| 57 scoped_ptr<ui::PlatformWindow> window) { | 59 scoped_ptr<ui::PlatformWindow> window) { |
| 58 window_ = window.Pass(); | 60 window_ = window.Pass(); |
| 59 } | 61 } |
| 60 | 62 |
| 61 WindowTreeHostPlatform::~WindowTreeHostPlatform() { | 63 WindowTreeHostPlatform::~WindowTreeHostPlatform() { |
| 62 DestroyCompositor(); | 64 DestroyCompositor(); |
| 63 DestroyDispatcher(); | 65 DestroyDispatcher(); |
| 64 } | 66 } |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 DCHECK_EQ(widget, widget_); | 196 DCHECK_EQ(widget, widget_); |
| 195 widget_ = gfx::kNullAcceleratedWidget; | 197 widget_ = gfx::kNullAcceleratedWidget; |
| 196 } | 198 } |
| 197 | 199 |
| 198 void WindowTreeHostPlatform::OnActivationChanged(bool active) { | 200 void WindowTreeHostPlatform::OnActivationChanged(bool active) { |
| 199 if (active) | 201 if (active) |
| 200 OnHostActivated(); | 202 OnHostActivated(); |
| 201 } | 203 } |
| 202 | 204 |
| 203 } // namespace aura | 205 } // namespace aura |
| OLD | NEW |