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

Unified Diff: ui/aura_shell/modality_event_filter.cc

Issue 8574033: Beginnings of Window Modality support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698