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

Side by Side Diff: ash/shell.cc

Issue 10155015: Process all global shortcuts for Ash after InputMethodEventFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, address comments Created 8 years, 8 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 | Annotate | Revision Log
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 8
9 #include "ash/app_list/app_list.h" 9 #include "ash/app_list/app_list.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 key_rewriter_filter_.reset(new internal::KeyRewriterEventFilter); 644 key_rewriter_filter_.reset(new internal::KeyRewriterEventFilter);
645 AddRootWindowEventFilter(key_rewriter_filter_.get()); 645 AddRootWindowEventFilter(key_rewriter_filter_.get());
646 646
647 // PartialScreenshotEventFilter must be the second one to capture key 647 // PartialScreenshotEventFilter must be the second one to capture key
648 // events when the taking partial screenshot UI is there. 648 // events when the taking partial screenshot UI is there.
649 DCHECK_EQ(1U, GetRootWindowEventFilterCount()); 649 DCHECK_EQ(1U, GetRootWindowEventFilterCount());
650 partial_screenshot_filter_.reset(new internal::PartialScreenshotEventFilter); 650 partial_screenshot_filter_.reset(new internal::PartialScreenshotEventFilter);
651 AddRootWindowEventFilter(partial_screenshot_filter_.get()); 651 AddRootWindowEventFilter(partial_screenshot_filter_.get());
652 AddShellObserver(partial_screenshot_filter_.get()); 652 AddShellObserver(partial_screenshot_filter_.get());
653 653
654 // Then AcceleratorFilter and InputMethodEventFilter must be added (in this 654 // InputMethodEventFilter must be the third one. It has to be added before
655 // order) since they have the second highest priority. 655 // AcceleratorFilter.
656 DCHECK_EQ(2U, GetRootWindowEventFilterCount()); 656 DCHECK_EQ(2U, GetRootWindowEventFilterCount());
657 input_method_filter_.reset(new internal::InputMethodEventFilter);
658 AddRootWindowEventFilter(input_method_filter_.get());
657 #if !defined(OS_MACOSX) 659 #if !defined(OS_MACOSX)
658 accelerator_filter_.reset(new internal::AcceleratorFilter); 660 accelerator_filter_.reset(new internal::AcceleratorFilter);
659 AddRootWindowEventFilter(accelerator_filter_.get()); 661 AddRootWindowEventFilter(accelerator_filter_.get());
660 DCHECK_EQ(3U, GetRootWindowEventFilterCount());
661 #endif 662 #endif
662 input_method_filter_.reset(new internal::InputMethodEventFilter);
663 AddRootWindowEventFilter(input_method_filter_.get());
664 663
665 system_gesture_filter_.reset(new internal::SystemGestureEventFilter); 664 system_gesture_filter_.reset(new internal::SystemGestureEventFilter);
666 AddRootWindowEventFilter(system_gesture_filter_.get()); 665 AddRootWindowEventFilter(system_gesture_filter_.get());
667 666
668 root_window->SetCursor(ui::kCursorPointer); 667 root_window->SetCursor(ui::kCursorPointer);
669 if (initially_hide_cursor_) 668 if (initially_hide_cursor_)
670 root_window->ShowCursor(false); 669 root_window->ShowCursor(false);
671 670
672 activation_controller_.reset(new internal::ActivationController); 671 activation_controller_.reset(new internal::ActivationController);
673 672
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 panel_container->SetLayoutManager(panel_layout_manager_); 958 panel_container->SetLayoutManager(panel_layout_manager_);
960 } 959 }
961 } 960 }
962 961
963 void Shell::DisableWorkspaceGridLayout() { 962 void Shell::DisableWorkspaceGridLayout() {
964 if (workspace_controller_.get()) 963 if (workspace_controller_.get())
965 workspace_controller_->workspace_manager()->set_grid_size(0); 964 workspace_controller_->workspace_manager()->set_grid_size(0);
966 } 965 }
967 966
968 } // namespace ash 967 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/nested_dispatcher_controller_unittest.cc ('k') | ui/base/accelerators/accelerator_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698