| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 OnHostResizedInPixels(bounds_.size()); | 143 OnHostResizedInPixels(bounds_.size()); |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 void WindowTreeHostPlatform::OnDamageRect(const gfx::Rect& damage_rect) { | 147 void WindowTreeHostPlatform::OnDamageRect(const gfx::Rect& damage_rect) { |
| 148 compositor()->ScheduleRedrawRect(damage_rect); | 148 compositor()->ScheduleRedrawRect(damage_rect); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void WindowTreeHostPlatform::DispatchEvent(ui::Event* event) { | 151 void WindowTreeHostPlatform::DispatchEvent(ui::Event* event) { |
| 152 TRACE_EVENT0("input", "WindowTreeHostPlatform::DispatchEvent"); | 152 TRACE_EVENT0("input", "WindowTreeHostPlatform::DispatchEvent"); |
| 153 ui::EventDispatchDetails details = SendEventToProcessor(event); | 153 ui::EventDispatchDetails details = SendEventToSink(event); |
| 154 if (details.dispatcher_destroyed) | 154 if (details.dispatcher_destroyed) |
| 155 event->SetHandled(); | 155 event->SetHandled(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void WindowTreeHostPlatform::OnCloseRequest() { | 158 void WindowTreeHostPlatform::OnCloseRequest() { |
| 159 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
| 160 // TODO: this obviously shouldn't be here. | 160 // TODO: this obviously shouldn't be here. |
| 161 base::MessageLoopForUI::current()->QuitWhenIdle(); | 161 base::MessageLoopForUI::current()->QuitWhenIdle(); |
| 162 #else | 162 #else |
| 163 OnHostCloseRequested(); | 163 OnHostCloseRequested(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 185 DCHECK_EQ(widget, widget_); | 185 DCHECK_EQ(widget, widget_); |
| 186 widget_ = gfx::kNullAcceleratedWidget; | 186 widget_ = gfx::kNullAcceleratedWidget; |
| 187 } | 187 } |
| 188 | 188 |
| 189 void WindowTreeHostPlatform::OnActivationChanged(bool active) { | 189 void WindowTreeHostPlatform::OnActivationChanged(bool active) { |
| 190 if (active) | 190 if (active) |
| 191 OnHostActivated(); | 191 OnHostActivated(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace aura | 194 } // namespace aura |
| OLD | NEW |