| 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 "extensions/shell/browser/shell_desktop_controller_aura.h" | 5 #include "extensions/shell/browser/shell_desktop_controller_aura.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "ui/aura/client/cursor_client.h" | 25 #include "ui/aura/client/cursor_client.h" |
| 26 #include "ui/aura/client/default_capture_client.h" | 26 #include "ui/aura/client/default_capture_client.h" |
| 27 #include "ui/aura/layout_manager.h" | 27 #include "ui/aura/layout_manager.h" |
| 28 #include "ui/aura/window.h" | 28 #include "ui/aura/window.h" |
| 29 #include "ui/aura/window_tree_host.h" | 29 #include "ui/aura/window_tree_host.h" |
| 30 #include "ui/base/cursor/cursor.h" | 30 #include "ui/base/cursor/cursor.h" |
| 31 #include "ui/base/cursor/image_cursors.h" | 31 #include "ui/base/cursor/image_cursors.h" |
| 32 #include "ui/base/ime/input_method.h" | 32 #include "ui/base/ime/input_method.h" |
| 33 #include "ui/base/user_activity/user_activity_detector.h" | 33 #include "ui/base/user_activity/user_activity_detector.h" |
| 34 #include "ui/display/screen.h" | 34 #include "ui/display/screen.h" |
| 35 #include "ui/events/event_processor.h" | 35 #include "ui/events/event_sink.h" |
| 36 #include "ui/gfx/geometry/size.h" | 36 #include "ui/gfx/geometry/size.h" |
| 37 #include "ui/gfx/native_widget_types.h" | 37 #include "ui/gfx/native_widget_types.h" |
| 38 #include "ui/wm/core/base_focus_rules.h" | 38 #include "ui/wm/core/base_focus_rules.h" |
| 39 #include "ui/wm/core/compound_event_filter.h" | 39 #include "ui/wm/core/compound_event_filter.h" |
| 40 #include "ui/wm/core/cursor_manager.h" | 40 #include "ui/wm/core/cursor_manager.h" |
| 41 #include "ui/wm/core/focus_controller.h" | 41 #include "ui/wm/core/focus_controller.h" |
| 42 #include "ui/wm/core/native_cursor_manager.h" | 42 #include "ui/wm/core/native_cursor_manager.h" |
| 43 #include "ui/wm/core/native_cursor_manager_delegate.h" | 43 #include "ui/wm/core/native_cursor_manager_delegate.h" |
| 44 | 44 |
| 45 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 | 275 |
| 276 ui::EventDispatchDetails ShellDesktopControllerAura::DispatchKeyEventPostIME( | 276 ui::EventDispatchDetails ShellDesktopControllerAura::DispatchKeyEventPostIME( |
| 277 ui::KeyEvent* key_event) { | 277 ui::KeyEvent* key_event) { |
| 278 // The input method has processed this event, so prevent the handler from | 278 // The input method has processed this event, so prevent the handler from |
| 279 // dispatching it again. | 279 // dispatching it again. |
| 280 input_method_event_handler_->set_post_ime(true); | 280 input_method_event_handler_->set_post_ime(true); |
| 281 | 281 |
| 282 // Send the event on to the host. | 282 // Send the event on to the host. |
| 283 ui::EventDispatchDetails details = | 283 ui::EventDispatchDetails details = |
| 284 host_->event_processor()->OnEventFromSource(key_event); | 284 host_->event_sink()->OnEventFromSource(key_event); |
| 285 | 285 |
| 286 // Clear the handler's PostIME flag for the next event. | 286 // Clear the handler's PostIME flag for the next event. |
| 287 if (!details.dispatcher_destroyed) | 287 if (!details.dispatcher_destroyed) |
| 288 input_method_event_handler_->set_post_ime(false); | 288 input_method_event_handler_->set_post_ime(false); |
| 289 | 289 |
| 290 return details; | 290 return details; |
| 291 } | 291 } |
| 292 | 292 |
| 293 void ShellDesktopControllerAura::InitWindowManager() { | 293 void ShellDesktopControllerAura::InitWindowManager() { |
| 294 wm::FocusController* focus_controller = | 294 wm::FocusController* focus_controller = |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 if (displays.empty()) | 391 if (displays.empty()) |
| 392 return gfx::Size(); | 392 return gfx::Size(); |
| 393 const display::DisplayMode* mode = displays[0]->current_mode(); | 393 const display::DisplayMode* mode = displays[0]->current_mode(); |
| 394 return mode ? mode->size() : gfx::Size(); | 394 return mode ? mode->size() : gfx::Size(); |
| 395 #else | 395 #else |
| 396 return gfx::Size(); | 396 return gfx::Size(); |
| 397 #endif | 397 #endif |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace extensions | 400 } // namespace extensions |
| OLD | NEW |