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

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

Issue 9035001: Move some more WM functionality down into ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
6 #define UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
7 #pragma once
8
9 #include "ui/aura_shell/toplevel_window_event_filter.h"
10
11 namespace aura {
12 class MouseEvent;
13 class Window;
14 }
15
16 namespace aura_shell {
17 namespace internal {
18
19 class DefaultContainerEventFilter : public ToplevelWindowEventFilter {
20 public:
21 explicit DefaultContainerEventFilter(aura::Window* owner);
22 virtual ~DefaultContainerEventFilter();
23
24 // Overridden from ToplevelWindowEventFilter:
25 virtual bool PreHandleMouseEvent(aura::Window* target,
26 aura::MouseEvent* event) OVERRIDE;
27
28 private:
29 enum DragState {
30 DRAG_NONE,
31 DRAG_MOVE,
32 DRAG_RESIZE
33 };
34
35 // If the mouse is currently over a portion of the window that should
36 // trigger a drag or resize, drag_state_ is set appropriately and true
37 // is returned. If the mouse is not over a portion of the window that should
38 // trigger a more or resize, drag_state_ is not updated and false is returend.
39 bool UpdateDragState();
40
41 // Updates the top-level window under the mouse so that we can change
42 // the look of the caption area based on mouse-hover.
43 void UpdateHoveredWindow(aura::Window* toplevel);
44
45 DragState drag_state_;
46 // Top-level window under the mouse cursor.
47 aura::Window* hovered_window_;
48
49 DISALLOW_COPY_AND_ASSIGN(DefaultContainerEventFilter);
50 };
51
52 } // namespace internal
53 } // namespace aura_shell
54
55 #endif // UI_AURA_SHELL_DEFAULT_CONTAINER_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/compact_layout_manager.cc ('k') | ui/aura_shell/default_container_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698