OLD | NEW |
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_WIDGET_WIDGET_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // Called by the Widget to create the NonClient Frame View for this widget. | 139 // Called by the Widget to create the NonClient Frame View for this widget. |
140 // Return NULL to use the default one. | 140 // Return NULL to use the default one. |
141 virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget); | 141 virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget); |
142 | 142 |
143 // Returns true if the window can be notified with the work area change. | 143 // Returns true if the window can be notified with the work area change. |
144 // Otherwise, the work area change for the top window will be processed by | 144 // Otherwise, the work area change for the top window will be processed by |
145 // the default window manager. In some cases, like panel, we would like to | 145 // the default window manager. In some cases, like panel, we would like to |
146 // manage the positions by ourselves. | 146 // manage the positions by ourselves. |
147 virtual bool WillProcessWorkAreaChange() const; | 147 virtual bool WillProcessWorkAreaChange() const; |
148 | 148 |
| 149 // Returns true if window has a hit-test mask. |
| 150 virtual bool HasHitTestMask() const; |
| 151 |
| 152 // Provides the hit-test mask if HasHitTestMask above returns true. |
| 153 virtual void GetHitTestMask(gfx::Path* mask) const; |
| 154 |
149 protected: | 155 protected: |
150 virtual ~WidgetDelegate() {} | 156 virtual ~WidgetDelegate() {} |
151 | 157 |
152 private: | 158 private: |
153 View* default_contents_view_; | 159 View* default_contents_view_; |
154 | 160 |
155 DISALLOW_COPY_AND_ASSIGN(WidgetDelegate); | 161 DISALLOW_COPY_AND_ASSIGN(WidgetDelegate); |
156 }; | 162 }; |
157 | 163 |
158 // A WidgetDelegate implementation that is-a View. Used to override GetWidget() | 164 // A WidgetDelegate implementation that is-a View. Used to override GetWidget() |
159 // to call View's GetWidget() for the common case where a WidgetDelegate | 165 // to call View's GetWidget() for the common case where a WidgetDelegate |
160 // implementation is-a View. | 166 // implementation is-a View. |
161 class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { | 167 class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { |
162 public: | 168 public: |
163 WidgetDelegateView(); | 169 WidgetDelegateView(); |
164 virtual ~WidgetDelegateView(); | 170 virtual ~WidgetDelegateView(); |
165 | 171 |
166 // Overridden from WidgetDelegate: | 172 // Overridden from WidgetDelegate: |
167 virtual Widget* GetWidget() OVERRIDE; | 173 virtual Widget* GetWidget() OVERRIDE; |
168 virtual const Widget* GetWidget() const OVERRIDE; | 174 virtual const Widget* GetWidget() const OVERRIDE; |
169 | 175 |
170 private: | 176 private: |
171 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); | 177 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); |
172 }; | 178 }; |
173 | 179 |
174 } // namespace views | 180 } // namespace views |
175 | 181 |
176 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 182 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
OLD | NEW |