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

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

Issue 32463003: Modify hit test masks for tabs and tab close buttons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: HitTestSource moved Created 7 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 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_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 14 matching lines...) Expand all
25 #include "ui/compositor/layer_delegate.h" 25 #include "ui/compositor/layer_delegate.h"
26 #include "ui/compositor/layer_owner.h" 26 #include "ui/compositor/layer_owner.h"
27 #include "ui/events/event.h" 27 #include "ui/events/event.h"
28 #include "ui/events/event_target.h" 28 #include "ui/events/event_target.h"
29 #include "ui/gfx/native_widget_types.h" 29 #include "ui/gfx/native_widget_types.h"
30 #include "ui/gfx/rect.h" 30 #include "ui/gfx/rect.h"
31 #include "ui/gfx/vector2d.h" 31 #include "ui/gfx/vector2d.h"
32 #include "ui/views/background.h" 32 #include "ui/views/background.h"
33 #include "ui/views/border.h" 33 #include "ui/views/border.h"
34 #include "ui/views/focus_border.h" 34 #include "ui/views/focus_border.h"
35 #include "ui/views/rect_based_targeting_utils.h"
35 36
36 #if defined(OS_WIN) 37 #if defined(OS_WIN)
37 #include "base/win/scoped_comptr.h" 38 #include "base/win/scoped_comptr.h"
38 #endif 39 #endif
39 40
40 using ui::OSExchangeData; 41 using ui::OSExchangeData;
41 42
42 namespace gfx { 43 namespace gfx {
43 class Canvas; 44 class Canvas;
44 class Insets; 45 class Insets;
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 // Input --------------------------------------------------------------------- 1120 // Input ---------------------------------------------------------------------
1120 1121
1121 // Called by HitTestRect() to see if this View has a custom hit test mask. If 1122 // Called by HitTestRect() to see if this View has a custom hit test mask. If
1122 // the return value is true, GetHitTestMask() will be called to obtain the 1123 // the return value is true, GetHitTestMask() will be called to obtain the
1123 // mask. Default value is false, in which case the View will hit-test against 1124 // mask. Default value is false, in which case the View will hit-test against
1124 // its bounds. 1125 // its bounds.
1125 virtual bool HasHitTestMask() const; 1126 virtual bool HasHitTestMask() const;
1126 1127
1127 // Called by HitTestRect() to retrieve a mask for hit-testing against. 1128 // Called by HitTestRect() to retrieve a mask for hit-testing against.
1128 // Subclasses override to provide custom shaped hit test regions. 1129 // Subclasses override to provide custom shaped hit test regions.
1129 virtual void GetHitTestMask(gfx::Path* mask) const; 1130 virtual void GetHitTestMask(HitTestSource source, gfx::Path* mask) const;
Ben Goodger (Google) 2013/10/30 17:46:55 I didn't just mean move the enum out of View, I me
1130 1131
1131 virtual DragInfo* GetDragInfo(); 1132 virtual DragInfo* GetDragInfo();
1132 1133
1133 // Focus --------------------------------------------------------------------- 1134 // Focus ---------------------------------------------------------------------
1134 1135
1135 // Override to be notified when focus has changed either to or from this View. 1136 // Override to be notified when focus has changed either to or from this View.
1136 virtual void OnFocus(); 1137 virtual void OnFocus();
1137 virtual void OnBlur(); 1138 virtual void OnBlur();
1138 1139
1139 // Handle view focus/blur events for this view. 1140 // Handle view focus/blur events for this view.
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 // Belongs to this view, but it's reference-counted on some platforms 1553 // Belongs to this view, but it's reference-counted on some platforms
1553 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1554 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1554 NativeViewAccessibility* native_view_accessibility_; 1555 NativeViewAccessibility* native_view_accessibility_;
1555 1556
1556 DISALLOW_COPY_AND_ASSIGN(View); 1557 DISALLOW_COPY_AND_ASSIGN(View);
1557 }; 1558 };
1558 1559
1559 } // namespace views 1560 } // namespace views
1560 1561
1561 #endif // UI_VIEWS_VIEW_H_ 1562 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698