| OLD | NEW |
| 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 ASH_WM_ROOT_WINDOW_EVENT_FILTER_H_ | 5 #ifndef ASH_WM_ROOT_WINDOW_EVENT_FILTER_H_ |
| 6 #define ASH_WM_ROOT_WINDOW_EVENT_FILTER_H_ | 6 #define ASH_WM_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" |
| 11 #include "ui/aura/event.h" | 11 #include "ui/aura/event.h" |
| 12 #include "ui/aura/event_filter.h" | 12 #include "ui/aura/event_filter.h" |
| 13 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
| 14 | 14 |
| 15 namespace aura_shell { | 15 namespace ash { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 // RootWindowEventFilter gets all root window events first and can provide | 18 // RootWindowEventFilter gets all root window events first and can provide |
| 19 // actions to those events. It implements root window features such as click to | 19 // actions to those events. It implements root window features such as click to |
| 20 // activate a window and cursor change when moving mouse. | 20 // activate a window and cursor change when moving mouse. |
| 21 // Additional event filters can be added to RootWIndowEventFilter. Events will | 21 // Additional event filters can be added to RootWIndowEventFilter. Events will |
| 22 // pass through those additional filters in their addition order and could be | 22 // pass through those additional filters in their addition order and could be |
| 23 // consumed by any of those filters. If an event is consumed by a filter, the | 23 // consumed by any of those filters. If an event is consumed by a filter, the |
| 24 // rest of the filter(s) and RootWindowEventFilter will not see the consumed | 24 // rest of the filter(s) and RootWindowEventFilter will not see the consumed |
| 25 // event. | 25 // event. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ui::TouchStatus FilterTouchEvent(aura::Window* target, | 57 ui::TouchStatus FilterTouchEvent(aura::Window* target, |
| 58 aura::TouchEvent* event); | 58 aura::TouchEvent* event); |
| 59 | 59 |
| 60 // Additional event filters that pre-handles events. | 60 // Additional event filters that pre-handles events. |
| 61 ObserverList<aura::EventFilter, true> filters_; | 61 ObserverList<aura::EventFilter, true> filters_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(RootWindowEventFilter); | 63 DISALLOW_COPY_AND_ASSIGN(RootWindowEventFilter); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace internal | 66 } // namespace internal |
| 67 } // namespace aura_shell | 67 } // namespace ash |
| 68 | 68 |
| 69 #endif // ASH_WM_ROOT_WINDOW_EVENT_FILTER_H_ | 69 #endif // ASH_WM_ROOT_WINDOW_EVENT_FILTER_H_ |
| OLD | NEW |