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

Unified Diff: ui/aura_shell/default_container_event_filter.h

Issue 8381015: Add workspace to desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily exlucde tests failing on win Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura_shell/aura_shell.gyp ('k') | ui/aura_shell/default_container_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/default_container_event_filter.h
diff --git a/ui/aura_shell/default_container_event_filter.h b/ui/aura_shell/default_container_event_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..83710879fe582526b03fb63ecc21f04c8025013e
--- /dev/null
+++ b/ui/aura_shell/default_container_event_filter.h
@@ -0,0 +1,44 @@
+// 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.
+
+#ifndef UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
+#define UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
+#pragma once
+
+#include "ui/aura/toplevel_window_event_filter.h"
+
+namespace aura_shell {
+namespace internal {
+
+class DefaultContainerEventFilter : public aura::ToplevelWindowEventFilter {
+ public:
+ explicit DefaultContainerEventFilter(aura::Window* owner);
+ virtual ~DefaultContainerEventFilter();
+
+ // Overridden from aura::ToplevelWindowEventFilter:
+ virtual bool OnMouseEvent(aura::Window* target,
+ aura::MouseEvent* event) OVERRIDE;
+
+ private:
+ enum DragState {
+ DRAG_NONE,
+ DRAG_MOVE,
+ DRAG_RESIZE
+ };
+
+ // If the mouse is currently over a portion of the window that should
+ // trigger a drag or resize, drag_state_ is set appropriately and true
+ // is returned. If the mouse is not over a portion of the window that should
+ // trigger a more or resize, drag_state_ is not updated and false is returend.
+ bool UpdateDragState();
+
+ DragState drag_state_;
+
+ DISALLOW_COPY_AND_ASSIGN(DefaultContainerEventFilter);
+};
+
+} // namespace internal
+} // namespace aura_shell
+
+#endif // UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
« no previous file with comments | « ui/aura_shell/aura_shell.gyp ('k') | ui/aura_shell/default_container_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698