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

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

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/user_activity_detector.cc ('k') | ash/wm/window_modality_controller.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/wm/window_cycle_controller.h" 5 #include "ash/wm/window_cycle_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 23 matching lines...) Expand all
34 virtual ~WindowCycleEventFilter(); 34 virtual ~WindowCycleEventFilter();
35 35
36 // Overridden from aura::EventFilter: 36 // Overridden from aura::EventFilter:
37 virtual bool PreHandleKeyEvent(aura::Window* target, 37 virtual bool PreHandleKeyEvent(aura::Window* target,
38 ui::KeyEvent* event) OVERRIDE; 38 ui::KeyEvent* event) OVERRIDE;
39 virtual bool PreHandleMouseEvent(aura::Window* target, 39 virtual bool PreHandleMouseEvent(aura::Window* target,
40 ui::MouseEvent* event) OVERRIDE; 40 ui::MouseEvent* event) OVERRIDE;
41 virtual ui::TouchStatus PreHandleTouchEvent( 41 virtual ui::TouchStatus PreHandleTouchEvent(
42 aura::Window* target, 42 aura::Window* target,
43 ui::TouchEvent* event) OVERRIDE; 43 ui::TouchEvent* event) OVERRIDE;
44 virtual ui::GestureStatus PreHandleGestureEvent( 44 virtual ui::EventResult PreHandleGestureEvent(
45 aura::Window* target, 45 aura::Window* target,
46 ui::GestureEvent* event) OVERRIDE; 46 ui::GestureEvent* event) OVERRIDE;
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); 48 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter);
49 }; 49 };
50 50
51 // Watch for all keyboard events by filtering the root window. 51 // Watch for all keyboard events by filtering the root window.
52 WindowCycleEventFilter::WindowCycleEventFilter() { 52 WindowCycleEventFilter::WindowCycleEventFilter() {
53 } 53 }
54 54
(...skipping 17 matching lines...) Expand all
72 ui::MouseEvent* event) { 72 ui::MouseEvent* event) {
73 return false; // Not handled. 73 return false; // Not handled.
74 } 74 }
75 75
76 ui::TouchStatus WindowCycleEventFilter::PreHandleTouchEvent( 76 ui::TouchStatus WindowCycleEventFilter::PreHandleTouchEvent(
77 aura::Window* target, 77 aura::Window* target,
78 ui::TouchEvent* event) { 78 ui::TouchEvent* event) {
79 return ui::TOUCH_STATUS_UNKNOWN; // Not handled. 79 return ui::TOUCH_STATUS_UNKNOWN; // Not handled.
80 } 80 }
81 81
82 ui::GestureStatus WindowCycleEventFilter::PreHandleGestureEvent( 82 ui::EventResult WindowCycleEventFilter::PreHandleGestureEvent(
83 aura::Window* target, 83 aura::Window* target,
84 ui::GestureEvent* event) { 84 ui::GestureEvent* event) {
85 return ui::GESTURE_STATUS_UNKNOWN; // Not handled. 85 return ui::ER_UNHANDLED; // Not handled.
86 } 86 }
87 87
88 // Adds all the children of |window| to |windows|. 88 // Adds all the children of |window| to |windows|.
89 void AddAllChildren(aura::Window* window, 89 void AddAllChildren(aura::Window* window,
90 WindowCycleList::WindowList* windows) { 90 WindowCycleList::WindowList* windows) {
91 const WindowCycleList::WindowList& children(window->children()); 91 const WindowCycleList::WindowList& children(window->children());
92 windows->insert(windows->end(), children.begin(), children.end()); 92 windows->insert(windows->end(), children.begin(), children.end());
93 } 93 }
94 94
95 // Adds all the children of all of |window|s children to |windows|. 95 // Adds all the children of all of |window|s children to |windows|.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 mru_windows_.remove(window); 314 mru_windows_.remove(window);
315 if (window->id() == internal::kShellWindowId_WorkspaceContainer) 315 if (window->id() == internal::kShellWindowId_WorkspaceContainer)
316 window->RemoveObserver(this); 316 window->RemoveObserver(this);
317 } 317 }
318 318
319 void WindowCycleController::OnWindowDestroying(aura::Window* window) { 319 void WindowCycleController::OnWindowDestroying(aura::Window* window) {
320 window->RemoveObserver(this); 320 window->RemoveObserver(this);
321 } 321 }
322 322
323 } // namespace ash 323 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/user_activity_detector.cc ('k') | ash/wm/window_modality_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698