Chromium Code Reviews| Index: ui/aura_shell/modality_event_filter.cc |
| =================================================================== |
| --- ui/aura_shell/modality_event_filter.cc (revision 0) |
| +++ ui/aura_shell/modality_event_filter.cc (revision 0) |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/aura_shell/modality_event_filter.h" |
| + |
| +#include "ui/aura/event.h" |
| + |
| +namespace aura_shell { |
| +namespace internal { |
| + |
| +ModalityEventFilter::ModalityEventFilter(aura::Window* container, |
| + Delegate* delegate) |
| + : EventFilter(container), |
| + delegate_(delegate) { |
| +} |
| + |
| +ModalityEventFilter::~ModalityEventFilter() { |
| +} |
| + |
| +bool ModalityEventFilter::PreHandleKeyEvent(aura::Window* target, |
| + aura::KeyEvent* event) { |
| + return !delegate_->CanWindowReceiveEvents(target); |
| +} |
| +bool ModalityEventFilter::PreHandleMouseEvent(aura::Window* target, |
|
sky
2011/11/16 17:13:06
nit: newline between 24 and 25.
|
| + aura::MouseEvent* event) { |
| + return !delegate_->CanWindowReceiveEvents(target); |
| +} |
| + |
| +ui::TouchStatus ModalityEventFilter::PreHandleTouchEvent( |
| + aura::Window* target, |
| + aura::TouchEvent* event) { |
| + // TODO(sadrul): ! |
| + return ui::TOUCH_STATUS_UNKNOWN; |
| +} |
| + |
| +} // namespace internal |
| +} // namespace aura_shell |
| Property changes on: ui\aura_shell\modality_event_filter.cc |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |