OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "services/ui/ws/platform_display.h" | 5 #include "services/ui/ws/platform_display.h" |
6 | 6 |
7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "cc/ipc/quads.mojom.h" | 9 #include "cc/ipc/quads.mojom.h" |
10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // with an accelerator to a character event can change the character, for | 248 // with an accelerator to a character event can change the character, for |
249 // example, from 'M' to '^M'. | 249 // example, from 'M' to '^M'. |
250 DCHECK_EQ(key_press_event->key_code(), char_event.key_code()); | 250 DCHECK_EQ(key_press_event->key_code(), char_event.key_code()); |
251 DCHECK_EQ(key_press_event->flags(), char_event.flags()); | 251 DCHECK_EQ(key_press_event->flags(), char_event.flags()); |
252 delegate_->OnEvent(char_event); | 252 delegate_->OnEvent(char_event); |
253 } | 253 } |
254 #endif | 254 #endif |
255 } | 255 } |
256 | 256 |
257 void DefaultPlatformDisplay::OnCloseRequest() { | 257 void DefaultPlatformDisplay::OnCloseRequest() { |
258 platform_window_->Close(); | 258 display::PlatformScreen::GetInstance()->RequestCloseDisplay(GetId()); |
259 } | 259 } |
260 | 260 |
261 void DefaultPlatformDisplay::OnClosed() { | 261 void DefaultPlatformDisplay::OnClosed() {} |
262 if (delegate_) | |
263 delegate_->OnDisplayClosed(); | |
264 } | |
265 | 262 |
266 void DefaultPlatformDisplay::OnWindowStateChanged( | 263 void DefaultPlatformDisplay::OnWindowStateChanged( |
267 ui::PlatformWindowState new_state) {} | 264 ui::PlatformWindowState new_state) {} |
268 | 265 |
269 void DefaultPlatformDisplay::OnLostCapture() { | 266 void DefaultPlatformDisplay::OnLostCapture() { |
270 delegate_->OnNativeCaptureLost(); | 267 delegate_->OnNativeCaptureLost(); |
271 } | 268 } |
272 | 269 |
273 void DefaultPlatformDisplay::OnAcceleratedWidgetAvailable( | 270 void DefaultPlatformDisplay::OnAcceleratedWidgetAvailable( |
274 gfx::AcceleratedWidget widget, | 271 gfx::AcceleratedWidget widget, |
(...skipping 26 matching lines...) Expand all Loading... |
301 return delegate_ ? delegate_->IsInHighContrastMode() : false; | 298 return delegate_ ? delegate_->IsInHighContrastMode() : false; |
302 } | 299 } |
303 | 300 |
304 const ViewportMetrics& DefaultPlatformDisplay::GetViewportMetrics() { | 301 const ViewportMetrics& DefaultPlatformDisplay::GetViewportMetrics() { |
305 return metrics_; | 302 return metrics_; |
306 } | 303 } |
307 | 304 |
308 } // namespace ws | 305 } // namespace ws |
309 | 306 |
310 } // namespace ui | 307 } // namespace ui |
OLD | NEW |