| 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 #include "ui/views/window/dialog_delegate.h" | 5 #include "ui/views/window/dialog_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/views/controls/button/text_button.h" | 8 #include "ui/views/controls/button/text_button.h" |
| 9 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 if (default_button & ui::DIALOG_BUTTON_OK) | 84 if (default_button & ui::DIALOG_BUTTON_OK) |
| 85 return dcv->ok_button(); | 85 return dcv->ok_button(); |
| 86 if (default_button & ui::DIALOG_BUTTON_CANCEL) | 86 if (default_button & ui::DIALOG_BUTTON_CANCEL) |
| 87 return dcv->cancel_button(); | 87 return dcv->cancel_button(); |
| 88 return NULL; | 88 return NULL; |
| 89 } | 89 } |
| 90 | 90 |
| 91 ClientView* DialogDelegate::CreateClientView(Widget* widget) { | 91 ClientView* DialogDelegate::CreateClientView(Widget* widget) { |
| 92 return new DialogClientView(widget, GetContentsView()); | 92 return new DialogClientView(widget, GetContentsView(), |
| 93 DialogClientView::STYLE_NATIVE); |
| 93 } | 94 } |
| 94 | 95 |
| 95 const DialogClientView* DialogDelegate::GetDialogClientView() const { | 96 const DialogClientView* DialogDelegate::GetDialogClientView() const { |
| 96 return GetWidget()->client_view()->AsDialogClientView(); | 97 return GetWidget()->client_view()->AsDialogClientView(); |
| 97 } | 98 } |
| 98 | 99 |
| 99 DialogClientView* DialogDelegate::GetDialogClientView() { | 100 DialogClientView* DialogDelegate::GetDialogClientView() { |
| 100 return GetWidget()->client_view()->AsDialogClientView(); | 101 return GetWidget()->client_view()->AsDialogClientView(); |
| 101 } | 102 } |
| 102 | 103 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 115 | 116 |
| 116 Widget* DialogDelegateView::GetWidget() { | 117 Widget* DialogDelegateView::GetWidget() { |
| 117 return View::GetWidget(); | 118 return View::GetWidget(); |
| 118 } | 119 } |
| 119 | 120 |
| 120 const Widget* DialogDelegateView::GetWidget() const { | 121 const Widget* DialogDelegateView::GetWidget() const { |
| 121 return View::GetWidget(); | 122 return View::GetWidget(); |
| 122 } | 123 } |
| 123 | 124 |
| 124 } // namespace views | 125 } // namespace views |
| OLD | NEW |