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

Side by Side Diff: ui/aura_shell/root_window_event_filter.h

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef UI_AURA_SHELL_ROOT_WINDOW_EVENT_FILTER_H_ 5 #ifndef UI_AURA_SHELL_ROOT_WINDOW_EVENT_FILTER_H_
6 #define UI_AURA_SHELL_ROOT_WINDOW_EVENT_FILTER_H_ 6 #define UI_AURA_SHELL_ROOT_WINDOW_EVENT_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // Overridden from EventFilter: 34 // Overridden from EventFilter:
35 virtual bool PreHandleKeyEvent(aura::Window* target, 35 virtual bool PreHandleKeyEvent(aura::Window* target,
36 aura::KeyEvent* event) OVERRIDE; 36 aura::KeyEvent* event) OVERRIDE;
37 virtual bool PreHandleMouseEvent(aura::Window* target, 37 virtual bool PreHandleMouseEvent(aura::Window* target,
38 aura::MouseEvent* event) OVERRIDE; 38 aura::MouseEvent* event) OVERRIDE;
39 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, 39 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
40 aura::TouchEvent* event) OVERRIDE; 40 aura::TouchEvent* event) OVERRIDE;
41 41
42 private: 42 private:
43 // If necessary, activates |window| and changes focus.
44 void ActivateIfNecessary(aura::Window* window, aura::Event* event);
45
46 // Updates the cursor if the target provides a custom one, and provides 43 // Updates the cursor if the target provides a custom one, and provides
47 // default resize cursors for window edges. 44 // default resize cursors for window edges.
48 void UpdateCursor(aura::Window* target, aura::MouseEvent* event); 45 void UpdateCursor(aura::Window* target, aura::MouseEvent* event);
49 46
50 // Dispatches event to addtional filters. Returns false or 47 // Dispatches event to additional filters. Returns false or
51 // ui::TOUCH_STATUS_UNKNOWN if event is consumed. 48 // ui::TOUCH_STATUS_UNKNOWN if event is consumed.
52 bool FilterKeyEvent(aura::Window* target, aura::KeyEvent* event); 49 bool FilterKeyEvent(aura::Window* target, aura::KeyEvent* event);
53 bool FilterMouseEvent(aura::Window* target, aura::MouseEvent* event); 50 bool FilterMouseEvent(aura::Window* target, aura::MouseEvent* event);
54 ui::TouchStatus FilterTouchEvent(aura::Window* target, 51 ui::TouchStatus FilterTouchEvent(aura::Window* target,
55 aura::TouchEvent* event); 52 aura::TouchEvent* event);
56 53
57 // Additional event filters that pre-handles events. 54 // Additional event filters that pre-handles events.
58 ObserverList<aura::EventFilter, true> filters_; 55 ObserverList<aura::EventFilter, true> filters_;
59 56
60 DISALLOW_COPY_AND_ASSIGN(RootWindowEventFilter); 57 DISALLOW_COPY_AND_ASSIGN(RootWindowEventFilter);
61 }; 58 };
62 59
63 } // namespace internal 60 } // namespace internal
64 } // namespace aura_shell 61 } // namespace aura_shell
65 62
66 #endif // UI_AURA_SHELL_ROOT_WINDOW_EVENT_FILTER_H_ 63 #endif // UI_AURA_SHELL_ROOT_WINDOW_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/modal_container_layout_manager_unittest.cc ('k') | ui/aura_shell/root_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698