Chromium Code Reviews| 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_WINDOW_DIALOG_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 // A DialogDelegate implementation that is-a View. Used to override GetWidget() | 131 // A DialogDelegate implementation that is-a View. Used to override GetWidget() |
| 132 // to call View's GetWidget() for the common case where a DialogDelegate | 132 // to call View's GetWidget() for the common case where a DialogDelegate |
| 133 // implementation is-a View. Note that DialogDelegateView is not owned by | 133 // implementation is-a View. Note that DialogDelegateView is not owned by |
| 134 // view's hierarchy and is expected to be deleted on DeleteDelegate call. | 134 // view's hierarchy and is expected to be deleted on DeleteDelegate call. |
| 135 class VIEWS_EXPORT DialogDelegateView : public DialogDelegate, | 135 class VIEWS_EXPORT DialogDelegateView : public DialogDelegate, |
| 136 public View { | 136 public View { |
| 137 public: | 137 public: |
| 138 DialogDelegateView(); | 138 DialogDelegateView(); |
| 139 ~DialogDelegateView() override; | 139 ~DialogDelegateView() override; |
| 140 | 140 |
| 141 virtual gfx::Size GetUnsnappedPreferredSize() const; | |
|
Peter Kasting
2017/03/30 00:35:36
Nit: Comment
| |
| 142 | |
| 141 // Overridden from DialogDelegate: | 143 // Overridden from DialogDelegate: |
| 142 void DeleteDelegate() override; | 144 void DeleteDelegate() override; |
| 143 Widget* GetWidget() override; | 145 Widget* GetWidget() override; |
| 144 const Widget* GetWidget() const override; | 146 const Widget* GetWidget() const override; |
| 145 View* GetContentsView() override; | 147 View* GetContentsView() override; |
| 146 | 148 |
| 147 // Overridden from View: | 149 // Overridden from View: |
| 148 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | 150 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 151 gfx::Size GetPreferredSize() const final; | |
| 149 void ViewHierarchyChanged( | 152 void ViewHierarchyChanged( |
| 150 const ViewHierarchyChangedDetails& details) override; | 153 const ViewHierarchyChangedDetails& details) override; |
| 151 | 154 |
| 152 private: | 155 private: |
| 153 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 156 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 } // namespace views | 159 } // namespace views |
| 157 | 160 |
| 158 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 161 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| OLD | NEW |