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/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/accessibility/ax_enums.h" | 10 #include "ui/accessibility/ax_enums.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // dialog box Window. The window that is displayed uses this interface to | 24 // dialog box Window. The window that is displayed uses this interface to |
25 // determine how it should be displayed and notify the delegate object of | 25 // determine how it should be displayed and notify the delegate object of |
26 // certain events. | 26 // certain events. |
27 // | 27 // |
28 /////////////////////////////////////////////////////////////////////////////// | 28 /////////////////////////////////////////////////////////////////////////////// |
29 class VIEWS_EXPORT DialogDelegate : public ui::DialogModel, | 29 class VIEWS_EXPORT DialogDelegate : public ui::DialogModel, |
30 public WidgetDelegate { | 30 public WidgetDelegate { |
31 public: | 31 public: |
32 virtual ~DialogDelegate(); | 32 virtual ~DialogDelegate(); |
33 | 33 |
34 // Create a |dialog| window Widget with the specified |context| or |parent|. | 34 // Create a dialog widget with the specified |context| or |parent|. |
35 static Widget* CreateDialogWidget(DialogDelegate* dialog, | 35 static Widget* CreateDialogWidget(WidgetDelegate* delegate, |
36 gfx::NativeView context, | 36 gfx::NativeView context, |
37 gfx::NativeView parent); | 37 gfx::NativeView parent); |
38 | 38 |
39 // Override this function to display an extra view adjacent to the buttons. | 39 // Override this function to display an extra view adjacent to the buttons. |
40 // Overrides may construct the view; this will only be called once per dialog. | 40 // Overrides may construct the view; this will only be called once per dialog. |
41 virtual View* CreateExtraView(); | 41 virtual View* CreateExtraView(); |
42 | 42 |
43 // Override this function to display an extra view in the titlebar. | 43 // Override this function to display an extra view in the titlebar. |
44 // Overrides may construct the view; this will only be called once per dialog. | 44 // Overrides may construct the view; this will only be called once per dialog. |
45 // Note: this only works for new style dialogs. | 45 // Note: this only works for new style dialogs. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 virtual const Widget* GetWidget() const OVERRIDE; | 124 virtual const Widget* GetWidget() const OVERRIDE; |
125 virtual View* GetContentsView() OVERRIDE; | 125 virtual View* GetContentsView() OVERRIDE; |
126 | 126 |
127 private: | 127 private: |
128 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 128 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace views | 131 } // namespace views |
132 | 132 |
133 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 133 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
OLD | NEW |