| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 DISALLOW_COPY_AND_ASSIGN(WidgetDelegate); | 194 DISALLOW_COPY_AND_ASSIGN(WidgetDelegate); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 // A WidgetDelegate implementation that is-a View. Used to override GetWidget() | 197 // A WidgetDelegate implementation that is-a View. Used to override GetWidget() |
| 198 // to call View's GetWidget() for the common case where a WidgetDelegate | 198 // to call View's GetWidget() for the common case where a WidgetDelegate |
| 199 // implementation is-a View. Note that WidgetDelegateView is not owned by | 199 // implementation is-a View. Note that WidgetDelegateView is not owned by |
| 200 // view's hierarchy and is expected to be deleted on DeleteDelegate call. | 200 // view's hierarchy and is expected to be deleted on DeleteDelegate call. |
| 201 class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { | 201 class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { |
| 202 public: | 202 public: |
| 203 // Internal class name. |
| 204 static const char kViewClassName[]; |
| 205 |
| 203 WidgetDelegateView(); | 206 WidgetDelegateView(); |
| 204 ~WidgetDelegateView() override; | 207 ~WidgetDelegateView() override; |
| 205 | 208 |
| 206 // Overridden from WidgetDelegate: | 209 // WidgetDelegate: |
| 207 void DeleteDelegate() override; | 210 void DeleteDelegate() override; |
| 208 Widget* GetWidget() override; | 211 Widget* GetWidget() override; |
| 209 const Widget* GetWidget() const override; | 212 const Widget* GetWidget() const override; |
| 210 | 213 |
| 214 // View: |
| 215 const char* GetClassName() const override; |
| 216 |
| 211 private: | 217 private: |
| 212 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); | 218 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); |
| 213 }; | 219 }; |
| 214 | 220 |
| 215 } // namespace views | 221 } // namespace views |
| 216 | 222 |
| 217 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 223 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
| OLD | NEW |