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

Side by Side Diff: ash/shell.cc

Issue 2872343003: Remove InputMethodEventHandler. (Closed)
Patch Set: addressed feedback. Created 3 years, 7 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/mus/ash_window_tree_host_mus.cc ('k') | ash/test/ash_test_base.cc » ('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 #include <utility> 9 #include <utility>
10 10
(...skipping 23 matching lines...) Expand all
34 #include "ash/display/screen_orientation_controller_chromeos.h" 34 #include "ash/display/screen_orientation_controller_chromeos.h"
35 #include "ash/display/screen_position_controller.h" 35 #include "ash/display/screen_position_controller.h"
36 #include "ash/display/shutdown_observer_chromeos.h" 36 #include "ash/display/shutdown_observer_chromeos.h"
37 #include "ash/display/window_tree_host_manager.h" 37 #include "ash/display/window_tree_host_manager.h"
38 #include "ash/drag_drop/drag_drop_controller.h" 38 #include "ash/drag_drop/drag_drop_controller.h"
39 #include "ash/first_run/first_run_helper_impl.h" 39 #include "ash/first_run/first_run_helper_impl.h"
40 #include "ash/focus_cycler.h" 40 #include "ash/focus_cycler.h"
41 #include "ash/frame/custom_frame_view_ash.h" 41 #include "ash/frame/custom_frame_view_ash.h"
42 #include "ash/gpu_support.h" 42 #include "ash/gpu_support.h"
43 #include "ash/high_contrast/high_contrast_controller.h" 43 #include "ash/high_contrast/high_contrast_controller.h"
44 #include "ash/ime/input_method_event_handler.h"
45 #include "ash/keyboard/keyboard_ui.h" 44 #include "ash/keyboard/keyboard_ui.h"
46 #include "ash/laser/laser_pointer_controller.h" 45 #include "ash/laser/laser_pointer_controller.h"
47 #include "ash/login_status.h" 46 #include "ash/login_status.h"
48 #include "ash/magnifier/magnification_controller.h" 47 #include "ash/magnifier/magnification_controller.h"
49 #include "ash/magnifier/partial_magnification_controller.h" 48 #include "ash/magnifier/partial_magnification_controller.h"
50 #include "ash/media_controller.h" 49 #include "ash/media_controller.h"
51 #include "ash/new_window_controller.h" 50 #include "ash/new_window_controller.h"
52 #include "ash/palette_delegate.h" 51 #include "ash/palette_delegate.h"
53 #include "ash/public/cpp/config.h" 52 #include "ash/public/cpp/config.h"
54 #include "ash/public/cpp/shell_window_ids.h" 53 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 shell_delegate_->PreShutdown(); 613 shell_delegate_->PreShutdown();
615 614
616 // Remove the focus from any window. This will prevent overhead and side 615 // Remove the focus from any window. This will prevent overhead and side
617 // effects (e.g. crashes) from changing focus during shutdown. 616 // effects (e.g. crashes) from changing focus during shutdown.
618 // See bug crbug.com/134502. 617 // See bug crbug.com/134502.
619 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(nullptr); 618 aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(nullptr);
620 619
621 // Please keep in same order as in Init() because it's easy to miss one. 620 // Please keep in same order as in Init() because it's easy to miss one.
622 if (window_modality_controller_) 621 if (window_modality_controller_)
623 window_modality_controller_.reset(); 622 window_modality_controller_.reset();
624 if (config != Config::MASH) {
625 RemovePreTargetHandler(
626 window_tree_host_manager_->input_method_event_handler());
627 }
628 623
629 RemovePreTargetHandler(magnifier_key_scroll_handler_.get()); 624 RemovePreTargetHandler(magnifier_key_scroll_handler_.get());
630 magnifier_key_scroll_handler_.reset(); 625 magnifier_key_scroll_handler_.reset();
631 626
632 RemovePreTargetHandler(speech_feedback_handler_.get()); 627 RemovePreTargetHandler(speech_feedback_handler_.get());
633 speech_feedback_handler_.reset(); 628 speech_feedback_handler_.reset();
634 629
635 RemovePreTargetHandler(overlay_filter_.get()); 630 RemovePreTargetHandler(overlay_filter_.get());
636 overlay_filter_.reset(); 631 overlay_filter_.reset();
637 632
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 } 943 }
949 944
950 if (cursor_manager_) { 945 if (cursor_manager_) {
951 cursor_manager_->SetDisplay( 946 cursor_manager_->SetDisplay(
952 display::Screen::GetScreen()->GetPrimaryDisplay()); 947 display::Screen::GetScreen()->GetPrimaryDisplay());
953 } 948 }
954 949
955 accelerator_controller_ = shell_port_->CreateAcceleratorController(); 950 accelerator_controller_ = shell_port_->CreateAcceleratorController();
956 maximize_mode_controller_ = base::MakeUnique<MaximizeModeController>(); 951 maximize_mode_controller_ = base::MakeUnique<MaximizeModeController>();
957 952
958 if (!ShouldUseIMEService()) {
959 // Not applicable when using IME service as events are already routed to
960 // InputMethod first.
961 AddPreTargetHandler(
962 window_tree_host_manager_->input_method_event_handler());
963 }
964
965 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); 953 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler();
966 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); 954 AddPreTargetHandler(magnifier_key_scroll_handler_.get());
967 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); 955 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler();
968 AddPreTargetHandler(speech_feedback_handler_.get()); 956 AddPreTargetHandler(speech_feedback_handler_.get());
969 957
970 // The order in which event filters are added is significant. 958 // The order in which event filters are added is significant.
971 959
972 // ui::UserActivityDetector passes events to observers, so let them get 960 // ui::UserActivityDetector passes events to observers, so let them get
973 // rewritten first. 961 // rewritten first.
974 user_activity_detector_.reset(new ui::UserActivityDetector); 962 user_activity_detector_.reset(new ui::UserActivityDetector);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 void Shell::OnPrefServiceInitialized( 1252 void Shell::OnPrefServiceInitialized(
1265 std::unique_ptr<::PrefService> pref_service) { 1253 std::unique_ptr<::PrefService> pref_service) {
1266 if (!instance_) 1254 if (!instance_)
1267 return; 1255 return;
1268 // |pref_service_| is null if can't connect to Chrome (as happens when 1256 // |pref_service_| is null if can't connect to Chrome (as happens when
1269 // running mash outside of chrome --mash and chrome isn't built). 1257 // running mash outside of chrome --mash and chrome isn't built).
1270 pref_service_ = std::move(pref_service); 1258 pref_service_ = std::move(pref_service);
1271 } 1259 }
1272 1260
1273 } // namespace ash 1261 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/ash_window_tree_host_mus.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698