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

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

Issue 9609016: Initial cut at multi-window resize code. There's still some TODOs, but (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 9 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
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_VIEW_HOST_H_ 5 #ifndef UI_VIEWS_MOUSE_WATCHER_VIEW_HOST_H_
6 #define UI_VIEWS_MOUSE_WATCHER_VIEW_HOST_H_ 6 #define UI_VIEWS_MOUSE_WATCHER_VIEW_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/views/mouse_watcher.h" 9 #include "ui/views/mouse_watcher.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 class View; 13 class View;
14 14
15 class VIEWS_EXPORT MouseWatcherViewHost : public MouseWatcherHost { 15 class VIEWS_EXPORT MouseWatcherViewHost : public MouseWatcherHost {
16 public: 16 public:
17 // Creates a new MouseWatcherViewHost. |hot_zone_insets| is added to the 17 // Creates a new MouseWatcherViewHost. |hot_zone_insets| is added to the
18 // bounds of the view to determine the active zone. For example, if 18 // bounds of the view to determine the active zone. For example, if
19 // |hot_zone_insets.bottom()| is 10, then the listener is not notified if 19 // |hot_zone_insets.bottom()| is 10, then the listener is not notified if
20 // the y coordinate is between the origin of the view and height of the view 20 // the y coordinate is between the origin of the view and height of the view
21 // plus 10. 21 // plus 10.
22 MouseWatcherViewHost(View* view, const gfx::Insets& hot_zone_insets); 22 MouseWatcherViewHost(View* view, const gfx::Insets& hot_zone_insets);
23 virtual ~MouseWatcherViewHost(); 23 virtual ~MouseWatcherViewHost();
24 24
25 // MouseWatcherHost. 25 // MouseWatcherHost.
26 virtual bool Contains( 26 virtual bool Contains(const gfx::Point& screen_point,
27 const gfx::Point& screen_point, 27 MouseEventType type) OVERRIDE;
28 MouseEventType type) OVERRIDE;
29 28
30 private: 29 private:
31 bool IsCursorInViewZone(const gfx::Point& screen_point); 30 bool IsCursorInViewZone(const gfx::Point& screen_point);
32 bool IsMouseOverWindow(); 31 bool IsMouseOverWindow();
33 32
34 // View we're listening for events over. 33 // View we're listening for events over.
35 View* view_; 34 View* view_;
36 // Insets added to the bounds of the view. 35 // Insets added to the bounds of the view.
37 const gfx::Insets hot_zone_insets_; 36 const gfx::Insets hot_zone_insets_;
38 37
39 DISALLOW_COPY_AND_ASSIGN(MouseWatcherViewHost); 38 DISALLOW_COPY_AND_ASSIGN(MouseWatcherViewHost);
40 }; 39 };
41 40
42 } // namespace views 41 } // namespace views
43 42
44 #endif // UI_VIEWS_MOUSE_WATCHER_VIEW_HOST_H_ 43 #endif // UI_VIEWS_MOUSE_WATCHER_VIEW_HOST_H_
OLDNEW
« ash/wm/workspace/multi_window_resize_controller.h ('K') | « ui/views/mouse_watcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698