OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 5 #ifndef VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
6 #define VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 6 #define VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/base/accessibility/accessibility_types.h" | 9 #include "ui/base/accessibility/accessibility_types.h" |
10 #include "ui/base/message_box_flags.h" | 10 #include "ui/base/message_box_flags.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // presses if there is no "Cancel" button. This function should return | 89 // presses if there is no "Cancel" button. This function should return |
90 // true if the window can be closed after the window can be closed after | 90 // true if the window can be closed after the window can be closed after |
91 // it returns, or false if it must remain open. If |window_closing| is | 91 // it returns, or false if it must remain open. If |window_closing| is |
92 // true, it means that this handler is being called because the window is | 92 // true, it means that this handler is being called because the window is |
93 // being closed (e.g. by Window::Close) and there is no Cancel handler, | 93 // being closed (e.g. by Window::Close) and there is no Cancel handler, |
94 // so Accept is being called instead. | 94 // so Accept is being called instead. |
95 virtual bool Accept(bool window_closing); | 95 virtual bool Accept(bool window_closing); |
96 virtual bool Accept(); | 96 virtual bool Accept(); |
97 | 97 |
98 // Overridden from WindowDelegate: | 98 // Overridden from WindowDelegate: |
99 virtual View* GetInitiallyFocusedView(); | 99 virtual View* GetInitiallyFocusedView() OVERRIDE; |
100 | 100 virtual ClientView* CreateClientView(Widget* widget) OVERRIDE; |
101 // Overridden from WindowDelegate: | |
102 virtual ClientView* CreateClientView(Window* window); | |
103 | 101 |
104 // Called when the window has been closed. | 102 // Called when the window has been closed. |
105 virtual void OnClose() {} | 103 virtual void OnClose() {} |
106 | 104 |
107 // A helper for accessing the DialogClientView object contained by this | 105 // A helper for accessing the DialogClientView object contained by this |
108 // delegate's Window. | 106 // delegate's Window. |
109 DialogClientView* GetDialogClientView() const; | 107 DialogClientView* GetDialogClientView() const; |
110 | 108 |
111 protected: | 109 protected: |
112 // Overridden from WindowDelegate: | 110 // Overridden from WindowDelegate: |
113 virtual ui::AccessibilityTypes::Role GetAccessibleWindowRole() const OVERRIDE; | 111 virtual ui::AccessibilityTypes::Role GetAccessibleWindowRole() const OVERRIDE; |
114 }; | 112 }; |
115 | 113 |
116 } // namespace views | 114 } // namespace views |
117 | 115 |
118 #endif // VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 116 #endif // VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
OLD | NEW |