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

Side by Side Diff: ash/wm/window_cycle_controller.cc

Issue 9315004: Remove Owner param to EventFilter's ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « ash/wm/toplevel_window_event_filter.cc ('k') | ash/wm/window_modality_controller.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/wm/window_cycle_controller.h" 5 #include "ash/wm/window_cycle_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/wm/window_cycle_list.h" 9 #include "ash/wm/window_cycle_list.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 18 matching lines...) Expand all
29 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, 29 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
30 aura::TouchEvent* event) OVERRIDE; 30 aura::TouchEvent* event) OVERRIDE;
31 virtual ui::GestureStatus PreHandleGestureEvent( 31 virtual ui::GestureStatus PreHandleGestureEvent(
32 aura::Window* target, 32 aura::Window* target,
33 aura::GestureEvent* event) OVERRIDE; 33 aura::GestureEvent* event) OVERRIDE;
34 private: 34 private:
35 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); 35 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter);
36 }; 36 };
37 37
38 // Watch for all keyboard events by filtering the root window. 38 // Watch for all keyboard events by filtering the root window.
39 WindowCycleEventFilter::WindowCycleEventFilter() 39 WindowCycleEventFilter::WindowCycleEventFilter() {
40 : aura::EventFilter(aura::RootWindow::GetInstance()) {
41 } 40 }
42 41
43 WindowCycleEventFilter::~WindowCycleEventFilter() { 42 WindowCycleEventFilter::~WindowCycleEventFilter() {
44 } 43 }
45 44
46 bool WindowCycleEventFilter::PreHandleKeyEvent( 45 bool WindowCycleEventFilter::PreHandleKeyEvent(
47 aura::Window* target, 46 aura::Window* target,
48 aura::KeyEvent* event) { 47 aura::KeyEvent* event) {
49 // Views uses VKEY_MENU for both left and right Alt keys. 48 // Views uses VKEY_MENU for both left and right Alt keys.
50 if (event->key_code() == ui::VKEY_MENU && 49 if (event->key_code() == ui::VKEY_MENU &&
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 event_filter_.reset(); 145 event_filter_.reset();
147 } 146 }
148 } 147 }
149 148
150 void WindowCycleController::InstallEventFilter() { 149 void WindowCycleController::InstallEventFilter() {
151 event_filter_.reset(new WindowCycleEventFilter()); 150 event_filter_.reset(new WindowCycleEventFilter());
152 Shell::GetInstance()->AddRootWindowEventFilter(event_filter_.get()); 151 Shell::GetInstance()->AddRootWindowEventFilter(event_filter_.get());
153 } 152 }
154 153
155 } // namespace ash 154 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_filter.cc ('k') | ash/wm/window_modality_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698