Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: ash/shell.cc

Issue 1209663002: Use EventHandler for IME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/ime/input_method_event_handler.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 11 matching lines...) Expand all
22 #include "ash/display/event_transformation_handler.h" 22 #include "ash/display/event_transformation_handler.h"
23 #include "ash/display/mouse_cursor_event_filter.h" 23 #include "ash/display/mouse_cursor_event_filter.h"
24 #include "ash/display/screen_position_controller.h" 24 #include "ash/display/screen_position_controller.h"
25 #include "ash/drag_drop/drag_drop_controller.h" 25 #include "ash/drag_drop/drag_drop_controller.h"
26 #include "ash/first_run/first_run_helper_impl.h" 26 #include "ash/first_run/first_run_helper_impl.h"
27 #include "ash/focus_cycler.h" 27 #include "ash/focus_cycler.h"
28 #include "ash/frame/custom_frame_view_ash.h" 28 #include "ash/frame/custom_frame_view_ash.h"
29 #include "ash/gpu_support.h" 29 #include "ash/gpu_support.h"
30 #include "ash/high_contrast/high_contrast_controller.h" 30 #include "ash/high_contrast/high_contrast_controller.h"
31 #include "ash/host/ash_window_tree_host_init_params.h" 31 #include "ash/host/ash_window_tree_host_init_params.h"
32 #include "ash/ime/input_method_event_handler.h"
32 #include "ash/keyboard_uma_event_filter.h" 33 #include "ash/keyboard_uma_event_filter.h"
33 #include "ash/magnifier/magnification_controller.h" 34 #include "ash/magnifier/magnification_controller.h"
34 #include "ash/magnifier/partial_magnification_controller.h" 35 #include "ash/magnifier/partial_magnification_controller.h"
35 #include "ash/media_delegate.h" 36 #include "ash/media_delegate.h"
36 #include "ash/new_window_delegate.h" 37 #include "ash/new_window_delegate.h"
37 #include "ash/root_window_controller.h" 38 #include "ash/root_window_controller.h"
38 #include "ash/session/session_state_delegate.h" 39 #include "ash/session/session_state_delegate.h"
39 #include "ash/shelf/app_list_shelf_item_delegate.h" 40 #include "ash/shelf/app_list_shelf_item_delegate.h"
40 #include "ash/shelf/shelf_delegate.h" 41 #include "ash/shelf/shelf_delegate.h"
41 #include "ash/shelf/shelf_item_delegate.h" 42 #include "ash/shelf/shelf_item_delegate.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 views::FocusManagerFactory::Install(NULL); 667 views::FocusManagerFactory::Install(NULL);
667 668
668 // Remove the focus from any window. This will prevent overhead and side 669 // Remove the focus from any window. This will prevent overhead and side
669 // effects (e.g. crashes) from changing focus during shutdown. 670 // effects (e.g. crashes) from changing focus during shutdown.
670 // See bug crbug.com/134502. 671 // See bug crbug.com/134502.
671 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL); 672 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(NULL);
672 673
673 // Please keep in same order as in Init() because it's easy to miss one. 674 // Please keep in same order as in Init() because it's easy to miss one.
674 if (window_modality_controller_) 675 if (window_modality_controller_)
675 window_modality_controller_.reset(); 676 window_modality_controller_.reset();
677 RemovePreTargetHandler(display_controller_->input_method_event_handler());
676 #if defined(OS_CHROMEOS) 678 #if defined(OS_CHROMEOS)
677 RemovePreTargetHandler(magnifier_key_scroll_handler_.get()); 679 RemovePreTargetHandler(magnifier_key_scroll_handler_.get());
678 magnifier_key_scroll_handler_.reset(); 680 magnifier_key_scroll_handler_.reset();
679 681
680 RemovePreTargetHandler(speech_feedback_handler_.get()); 682 RemovePreTargetHandler(speech_feedback_handler_.get());
681 speech_feedback_handler_.reset(); 683 speech_feedback_handler_.reset();
682 #endif 684 #endif
683 RemovePreTargetHandler(overlay_filter_.get()); 685 RemovePreTargetHandler(overlay_filter_.get());
684 RemovePreTargetHandler(accelerator_filter_.get()); 686 RemovePreTargetHandler(accelerator_filter_.get());
685 RemovePreTargetHandler(event_transformation_handler_.get()); 687 RemovePreTargetHandler(event_transformation_handler_.get());
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 new ResolutionNotificationController); 913 new ResolutionNotificationController);
912 #endif 914 #endif
913 915
914 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); 916 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay());
915 917
916 nested_accelerator_controller_.reset( 918 nested_accelerator_controller_.reset(
917 new ::wm::NestedAcceleratorController(new NestedAcceleratorDelegate)); 919 new ::wm::NestedAcceleratorController(new NestedAcceleratorDelegate));
918 accelerator_controller_.reset(new AcceleratorController); 920 accelerator_controller_.reset(new AcceleratorController);
919 maximize_mode_controller_.reset(new MaximizeModeController()); 921 maximize_mode_controller_.reset(new MaximizeModeController());
920 922
923 AddPreTargetHandler(display_controller_->input_method_event_handler());
924
921 #if defined(OS_CHROMEOS) 925 #if defined(OS_CHROMEOS)
922 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); 926 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler();
923 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); 927 AddPreTargetHandler(magnifier_key_scroll_handler_.get());
924 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); 928 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler();
925 AddPreTargetHandler(speech_feedback_handler_.get()); 929 AddPreTargetHandler(speech_feedback_handler_.get());
926 #endif 930 #endif
927 931
928 // The order in which event filters are added is significant. 932 // The order in which event filters are added is significant.
929 933
930 // ui::UserActivityDetector passes events to observers, so let them get 934 // ui::UserActivityDetector passes events to observers, so let them get
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 1180
1177 void Shell::OnWindowActivated( 1181 void Shell::OnWindowActivated(
1178 aura::client::ActivationChangeObserver::ActivationReason reason, 1182 aura::client::ActivationChangeObserver::ActivationReason reason,
1179 aura::Window* gained_active, 1183 aura::Window* gained_active,
1180 aura::Window* lost_active) { 1184 aura::Window* lost_active) {
1181 if (gained_active) 1185 if (gained_active)
1182 target_root_window_ = gained_active->GetRootWindow(); 1186 target_root_window_ = gained_active->GetRootWindow();
1183 } 1187 }
1184 1188
1185 } // namespace ash 1189 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ime/input_method_event_handler.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698