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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/base/ui_base_switches.h" | 9 #include "ui/base/ui_base_switches.h" |
10 #include "ui/views/controls/button/text_button.h" | 10 #include "ui/views/controls/button/text_button.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 DialogDelegate* DialogDelegate::AsDialogDelegate() { | 100 DialogDelegate* DialogDelegate::AsDialogDelegate() { |
101 return this; | 101 return this; |
102 } | 102 } |
103 | 103 |
104 ClientView* DialogDelegate::CreateClientView(Widget* widget) { | 104 ClientView* DialogDelegate::CreateClientView(Widget* widget) { |
105 return new DialogClientView(widget, GetContentsView()); | 105 return new DialogClientView(widget, GetContentsView()); |
106 } | 106 } |
107 | 107 |
108 NonClientFrameView* DialogDelegate::CreateNonClientFrameView(Widget* widget) { | 108 NonClientFrameView* DialogDelegate::CreateNonClientFrameView(Widget* widget) { |
109 return UseNewStyle() ? new DialogFrameView() : | 109 return UseNewStyle() ? new DialogFrameView(GetWindowTitle()) : |
110 WidgetDelegate::CreateNonClientFrameView(widget); | 110 WidgetDelegate::CreateNonClientFrameView(widget); |
111 } | 111 } |
112 | 112 |
113 const DialogClientView* DialogDelegate::GetDialogClientView() const { | 113 const DialogClientView* DialogDelegate::GetDialogClientView() const { |
114 return GetWidget()->client_view()->AsDialogClientView(); | 114 return GetWidget()->client_view()->AsDialogClientView(); |
115 } | 115 } |
116 | 116 |
117 DialogClientView* DialogDelegate::GetDialogClientView() { | 117 DialogClientView* DialogDelegate::GetDialogClientView() { |
118 return GetWidget()->client_view()->AsDialogClientView(); | 118 return GetWidget()->client_view()->AsDialogClientView(); |
119 } | 119 } |
(...skipping 17 matching lines...) Expand all Loading... |
137 | 137 |
138 const Widget* DialogDelegateView::GetWidget() const { | 138 const Widget* DialogDelegateView::GetWidget() const { |
139 return View::GetWidget(); | 139 return View::GetWidget(); |
140 } | 140 } |
141 | 141 |
142 View* DialogDelegateView::GetContentsView() { | 142 View* DialogDelegateView::GetContentsView() { |
143 return this; | 143 return this; |
144 } | 144 } |
145 | 145 |
146 } // namespace views | 146 } // namespace views |
OLD | NEW |