| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "views/window/dialog_delegate.h" | 5 #include "views/window/dialog_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "views/controls/button/native_button.h" | 8 #include "views/controls/button/native_button.h" |
| 9 #include "views/window/window.h" | 9 #include "views/window/window.h" |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return NULL; | 83 return NULL; |
| 84 } | 84 } |
| 85 | 85 |
| 86 if (default_button & MessageBoxFlags::DIALOGBUTTON_OK) | 86 if (default_button & MessageBoxFlags::DIALOGBUTTON_OK) |
| 87 return dcv->ok_button(); | 87 return dcv->ok_button(); |
| 88 if (default_button & MessageBoxFlags::DIALOGBUTTON_CANCEL) | 88 if (default_button & MessageBoxFlags::DIALOGBUTTON_CANCEL) |
| 89 return dcv->cancel_button(); | 89 return dcv->cancel_button(); |
| 90 return NULL; | 90 return NULL; |
| 91 } | 91 } |
| 92 | 92 |
| 93 ClientView* DialogDelegate::CreateClientView(Window* window) { | 93 ClientView* DialogDelegate::CreateClientView(Widget* widget) { |
| 94 return new DialogClientView(window, GetContentsView()); | 94 return new DialogClientView(widget, GetContentsView()); |
| 95 } | 95 } |
| 96 | 96 |
| 97 DialogClientView* DialogDelegate::GetDialogClientView() const { | 97 DialogClientView* DialogDelegate::GetDialogClientView() const { |
| 98 return window()->client_view()->AsDialogClientView(); | 98 return window()->client_view()->AsDialogClientView(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const { | 101 ui::AccessibilityTypes::Role DialogDelegate::GetAccessibleWindowRole() const { |
| 102 return ui::AccessibilityTypes::ROLE_DIALOG; | 102 return ui::AccessibilityTypes::ROLE_DIALOG; |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace views | 105 } // namespace views |
| OLD | NEW |