| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 bool ShouldDefaultButtonBeBlue() const override; | 98 bool ShouldDefaultButtonBeBlue() const override; |
| 99 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 99 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 100 bool IsDialogButtonEnabled(ui::DialogButton button) const override; | 100 bool IsDialogButtonEnabled(ui::DialogButton button) const override; |
| 101 | 101 |
| 102 // Overridden from WidgetDelegate: | 102 // Overridden from WidgetDelegate: |
| 103 View* GetInitiallyFocusedView() override; | 103 View* GetInitiallyFocusedView() override; |
| 104 DialogDelegate* AsDialogDelegate() override; | 104 DialogDelegate* AsDialogDelegate() override; |
| 105 ClientView* CreateClientView(Widget* widget) override; | 105 ClientView* CreateClientView(Widget* widget) override; |
| 106 NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; | 106 NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; |
| 107 | 107 |
| 108 // Create a frame view using the new dialog style. | 108 static NonClientFrameView* CreateDialogFrameView(Widget* widget); |
| 109 // |content_margins|: margins between the content and the inside of the | |
| 110 // border, in pixels. | |
| 111 static NonClientFrameView* CreateDialogFrameView( | |
| 112 Widget* widget, | |
| 113 const gfx::Insets& content_margins); | |
| 114 | 109 |
| 115 // Returns true if this particular dialog should use a Chrome-styled frame | 110 // Returns true if this particular dialog should use a Chrome-styled frame |
| 116 // like the one used for bubbles. The alternative is a more platform-native | 111 // like the one used for bubbles. The alternative is a more platform-native |
| 117 // frame. | 112 // frame. |
| 118 virtual bool ShouldUseCustomFrame() const; | 113 virtual bool ShouldUseCustomFrame() const; |
| 119 | 114 |
| 120 // A helper for accessing the DialogClientView object contained by this | 115 // A helper for accessing the DialogClientView object contained by this |
| 121 // delegate's Window. | 116 // delegate's Window. |
| 122 const DialogClientView* GetDialogClientView() const; | 117 const DialogClientView* GetDialogClientView() const; |
| 123 DialogClientView* GetDialogClientView(); | 118 DialogClientView* GetDialogClientView(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 153 void ViewHierarchyChanged( | 148 void ViewHierarchyChanged( |
| 154 const ViewHierarchyChangedDetails& details) override; | 149 const ViewHierarchyChangedDetails& details) override; |
| 155 | 150 |
| 156 private: | 151 private: |
| 157 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 152 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
| 158 }; | 153 }; |
| 159 | 154 |
| 160 } // namespace views | 155 } // namespace views |
| 161 | 156 |
| 162 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 157 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| OLD | NEW |