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 "components/mus/display_manager.h" | 5 #include "components/mus/display_manager.h" |
6 | 6 |
7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
9 #include "cc/output/delegated_frame_data.h" | 9 #include "cc/output/delegated_frame_data.h" |
10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 key_press_event->flags()); | 310 key_press_event->flags()); |
311 | 311 |
312 DCHECK_EQ(key_press_event->GetCharacter(), char_event.GetCharacter()); | 312 DCHECK_EQ(key_press_event->GetCharacter(), char_event.GetCharacter()); |
313 DCHECK_EQ(key_press_event->key_code(), char_event.key_code()); | 313 DCHECK_EQ(key_press_event->key_code(), char_event.key_code()); |
314 DCHECK_EQ(key_press_event->flags(), char_event.flags()); | 314 DCHECK_EQ(key_press_event->flags(), char_event.flags()); |
315 | 315 |
316 char_event.SetExtendedKeyEventData( | 316 char_event.SetExtendedKeyEventData( |
317 make_scoped_ptr(new mojo::MojoExtendedKeyEventData( | 317 make_scoped_ptr(new mojo::MojoExtendedKeyEventData( |
318 key_press_event->GetLocatedWindowsKeyboardCode(), | 318 key_press_event->GetLocatedWindowsKeyboardCode(), |
319 key_press_event->GetText(), key_press_event->GetUnmodifiedText()))); | 319 key_press_event->GetText(), key_press_event->GetUnmodifiedText()))); |
320 char_event.set_platform_keycode(key_press_event->platform_keycode()); | |
321 | 320 |
322 delegate_->OnEvent(mojo::Event::From(char_event)); | 321 delegate_->OnEvent(mojo::Event::From(char_event)); |
323 } | 322 } |
324 #endif | 323 #endif |
325 } | 324 } |
326 | 325 |
327 void DefaultDisplayManager::OnCloseRequest() { | 326 void DefaultDisplayManager::OnCloseRequest() { |
328 platform_window_->Close(); | 327 platform_window_->Close(); |
329 } | 328 } |
330 | 329 |
(...skipping 12 matching lines...) Expand all Loading... |
343 if (widget != gfx::kNullAcceleratedWidget) { | 342 if (widget != gfx::kNullAcceleratedWidget) { |
344 top_level_display_client_.reset(new surfaces::TopLevelDisplayClient( | 343 top_level_display_client_.reset(new surfaces::TopLevelDisplayClient( |
345 widget, gpu_state_, surfaces_state_)); | 344 widget, gpu_state_, surfaces_state_)); |
346 } | 345 } |
347 UpdateMetrics(metrics_.size_in_pixels.To<gfx::Size>(), device_pixel_ratio); | 346 UpdateMetrics(metrics_.size_in_pixels.To<gfx::Size>(), device_pixel_ratio); |
348 } | 347 } |
349 | 348 |
350 void DefaultDisplayManager::OnActivationChanged(bool active) {} | 349 void DefaultDisplayManager::OnActivationChanged(bool active) {} |
351 | 350 |
352 } // namespace view_manager | 351 } // namespace view_manager |
OLD | NEW |