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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 95 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 96 bool IsDialogButtonEnabled(ui::DialogButton button) const override; | 96 bool IsDialogButtonEnabled(ui::DialogButton button) const override; |
| 97 | 97 |
| 98 // Overridden from WidgetDelegate: | 98 // Overridden from WidgetDelegate: |
| 99 View* GetInitiallyFocusedView() override; | 99 View* GetInitiallyFocusedView() override; |
| 100 DialogDelegate* AsDialogDelegate() override; | 100 DialogDelegate* AsDialogDelegate() override; |
| 101 ClientView* CreateClientView(Widget* widget) override; | 101 ClientView* CreateClientView(Widget* widget) override; |
| 102 NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; | 102 NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; |
| 103 | 103 |
| 104 // Create a frame view using the new dialog style. | 104 // Create a frame view using the new dialog style. |
| 105 static NonClientFrameView* CreateDialogFrameView(Widget* widget); | 105 static NonClientFrameView* CreateDialogFrameView( |
| 106 Widget* widget, | |
| 107 const gfx::Insets& content_margins); | |
|
sky
2016/11/07 16:13:06
Document what content_margins are.
juncai
2016/11/07 21:05:45
Done.
| |
| 106 | 108 |
| 107 // Returns true if this particular dialog should use a Chrome-styled frame | 109 // Returns true if this particular dialog should use a Chrome-styled frame |
| 108 // like the one used for bubbles. The alternative is a more platform-native | 110 // like the one used for bubbles. The alternative is a more platform-native |
| 109 // frame. | 111 // frame. |
| 110 virtual bool ShouldUseCustomFrame() const; | 112 virtual bool ShouldUseCustomFrame() const; |
| 111 | 113 |
| 112 // A helper for accessing the DialogClientView object contained by this | 114 // A helper for accessing the DialogClientView object contained by this |
| 113 // delegate's Window. | 115 // delegate's Window. |
| 114 const DialogClientView* GetDialogClientView() const; | 116 const DialogClientView* GetDialogClientView() const; |
| 115 DialogClientView* GetDialogClientView(); | 117 DialogClientView* GetDialogClientView(); |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 145 void ViewHierarchyChanged( | 147 void ViewHierarchyChanged( |
| 146 const ViewHierarchyChangedDetails& details) override; | 148 const ViewHierarchyChangedDetails& details) override; |
| 147 | 149 |
| 148 private: | 150 private: |
| 149 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 151 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 } // namespace views | 154 } // namespace views |
| 153 | 155 |
| 154 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 156 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| OLD | NEW |