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

Side by Side Diff: ash/shell.cc

Issue 2868463002: chromeos: enable MouseCursorEventFilter for mushrome (Closed)
Patch Set: combine 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
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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 RemovePreTargetHandler(speech_feedback_handler_.get()); 613 RemovePreTargetHandler(speech_feedback_handler_.get());
614 speech_feedback_handler_.reset(); 614 speech_feedback_handler_.reset();
615 615
616 RemovePreTargetHandler(overlay_filter_.get()); 616 RemovePreTargetHandler(overlay_filter_.get());
617 overlay_filter_.reset(); 617 overlay_filter_.reset();
618 618
619 RemovePreTargetHandler(accelerator_filter_.get()); 619 RemovePreTargetHandler(accelerator_filter_.get());
620 RemovePreTargetHandler(event_transformation_handler_.get()); 620 RemovePreTargetHandler(event_transformation_handler_.get());
621 RemovePreTargetHandler(toplevel_window_event_handler_.get()); 621 RemovePreTargetHandler(toplevel_window_event_handler_.get());
622 RemovePostTargetHandler(toplevel_window_event_handler_.get()); 622 RemovePostTargetHandler(toplevel_window_event_handler_.get());
623 if (config != Config::MASH) 623 if (config != Config::MASH) {
624 RemovePreTargetHandler(system_gesture_filter_.get()); 624 RemovePreTargetHandler(system_gesture_filter_.get());
625 if (config == Config::CLASSIC)
626 RemovePreTargetHandler(mouse_cursor_filter_.get()); 625 RemovePreTargetHandler(mouse_cursor_filter_.get());
626 }
627 RemovePreTargetHandler(modality_filter_.get()); 627 RemovePreTargetHandler(modality_filter_.get());
628 628
629 // TooltipController is deleted with the Shell so removing its references. 629 // TooltipController is deleted with the Shell so removing its references.
630 RemovePreTargetHandler(tooltip_controller_.get()); 630 RemovePreTargetHandler(tooltip_controller_.get());
631 631
632 screen_orientation_controller_.reset(); 632 screen_orientation_controller_.reset();
633 screen_layout_observer_.reset(); 633 screen_layout_observer_.reset();
634 634
635 // Destroy the virtual keyboard controller before the maximize mode controller 635 // Destroy the virtual keyboard controller before the maximize mode controller
636 // since the latters destructor triggers events that the former is listening 636 // since the latters destructor triggers events that the former is listening
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 user_activity_forwarder_ = base::MakeUnique<aura::UserActivityForwarder>( 991 user_activity_forwarder_ = base::MakeUnique<aura::UserActivityForwarder>(
992 std::move(user_activity_monitor), user_activity_detector_.get()); 992 std::move(user_activity_monitor), user_activity_detector_.get());
993 } 993 }
994 994
995 drag_drop_controller_.reset(new DragDropController); 995 drag_drop_controller_.reset(new DragDropController);
996 // |screenshot_controller_| needs to be created (and prepended as a 996 // |screenshot_controller_| needs to be created (and prepended as a
997 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to 997 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to
998 // process mouse events prior to screenshot session. 998 // process mouse events prior to screenshot session.
999 // See http://crbug.com/459214 999 // See http://crbug.com/459214
1000 screenshot_controller_.reset(new ScreenshotController()); 1000 screenshot_controller_.reset(new ScreenshotController());
1001 // TODO: evaluate if MouseCursorEventFilter needs to work for mus/mash. 1001 // TODO: evaluate if MouseCursorEventFilter needs to work for mash.
1002 // http://crbug.com/706474. 1002 // http://crbug.com/706474.
1003 if (config == Config::CLASSIC) { 1003 if (config != Config::MASH) {
1004 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); 1004 mouse_cursor_filter_.reset(new MouseCursorEventFilter());
1005 PrependPreTargetHandler(mouse_cursor_filter_.get()); 1005 PrependPreTargetHandler(mouse_cursor_filter_.get());
1006 } 1006 }
1007 1007
1008 // Create Controllers that may need root window. 1008 // Create Controllers that may need root window.
1009 // TODO(oshima): Move as many controllers before creating 1009 // TODO(oshima): Move as many controllers before creating
1010 // RootWindowController as possible. 1010 // RootWindowController as possible.
1011 visibility_controller_.reset(new AshVisibilityController); 1011 visibility_controller_.reset(new AshVisibilityController);
1012 1012
1013 laser_pointer_controller_.reset(new LaserPointerController()); 1013 laser_pointer_controller_.reset(new LaserPointerController());
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 void Shell::OnPrefServiceInitialized( 1242 void Shell::OnPrefServiceInitialized(
1243 std::unique_ptr<::PrefService> pref_service) { 1243 std::unique_ptr<::PrefService> pref_service) {
1244 if (!instance_) 1244 if (!instance_)
1245 return; 1245 return;
1246 // |pref_service_| is null if can't connect to Chrome (as happens when 1246 // |pref_service_| is null if can't connect to Chrome (as happens when
1247 // running mash outside of chrome --mash and chrome isn't built). 1247 // running mash outside of chrome --mash and chrome isn't built).
1248 pref_service_ = std::move(pref_service); 1248 pref_service_ = std::move(pref_service);
1249 } 1249 }
1250 1250
1251 } // namespace ash 1251 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/filters/ash_mus_unittests.filter » ('j') | testing/buildbot/filters/ash_mus_unittests.filter » ('J')

Powered by Google App Engine
This is Rietveld 408576698