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

Side by Side Diff: ui/views/mouse_watcher.h

Issue 753933003: Dismiss the multi window resizer when the user clicks outside of the resizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@toplevel_consume_press
Patch Set: Created 6 years 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
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.cc ('k') | ui/views/mouse_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_MOUSE_WATCHER_H_ 5 #ifndef UI_VIEWS_MOUSE_WATCHER_H_
6 #define UI_VIEWS_MOUSE_WATCHER_H_ 6 #define UI_VIEWS_MOUSE_WATCHER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 virtual void MouseMovedOutOfHost() = 0; 23 virtual void MouseMovedOutOfHost() = 0;
24 24
25 protected: 25 protected:
26 virtual ~MouseWatcherListener(); 26 virtual ~MouseWatcherListener();
27 }; 27 };
28 28
29 // The MouseWatcherHost determines what region is to be monitored. 29 // The MouseWatcherHost determines what region is to be monitored.
30 class VIEWS_EXPORT MouseWatcherHost { 30 class VIEWS_EXPORT MouseWatcherHost {
31 public: 31 public:
32 // The MouseEventType can be used as a hint. 32 // The type of mouse event.
33 enum MouseEventType { 33 enum MouseEventType {
34 // The mouse moved within the window which was current when the MouseWatcher
35 // was created.
36 MOUSE_MOVE, 34 MOUSE_MOVE,
37 // The mouse moved exited the window which was current when the MouseWatcher 35 MOUSE_EXIT,
38 // was created. 36 MOUSE_PRESS
39 MOUSE_EXIT
40 }; 37 };
41 38
42 virtual ~MouseWatcherHost(); 39 virtual ~MouseWatcherHost();
43 40
44 // Return false when the mouse has moved outside the monitored region. 41 // Return false when the mouse has moved outside the monitored region.
45 virtual bool Contains(const gfx::Point& screen_point, 42 virtual bool Contains(const gfx::Point& screen_point,
46 MouseEventType type) = 0; 43 MouseEventType type) = 0;
47 }; 44 };
48 45
49 // MouseWatcher is used to watch mouse movement and notify its listener when the 46 // MouseWatcher is used to watch mouse movement and notify its listener when the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 88
92 // See description above setter. 89 // See description above setter.
93 base::TimeDelta notify_on_exit_time_; 90 base::TimeDelta notify_on_exit_time_;
94 91
95 DISALLOW_COPY_AND_ASSIGN(MouseWatcher); 92 DISALLOW_COPY_AND_ASSIGN(MouseWatcher);
96 }; 93 };
97 94
98 } // namespace views 95 } // namespace views
99 96
100 #endif // UI_VIEWS_MOUSE_WATCHER_H_ 97 #endif // UI_VIEWS_MOUSE_WATCHER_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.cc ('k') | ui/views/mouse_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698