Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: ui/views/window/dialog_delegate.cc

Issue 15667004: Add resize support for Views new style dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove incorrect DialogDelegate::CanResize overrride. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "grit/ui_strings.h" 8 #include "grit/ui_strings.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/ui_base_switches_util.h" 10 #include "ui/base/ui_base_switches_util.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 color)); 181 color));
182 } 182 }
183 frame->SetTitle(widget->widget_delegate()->GetWindowTitle()); 183 frame->SetTitle(widget->widget_delegate()->GetWindowTitle());
184 DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate(); 184 DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate();
185 if (delegate) { 185 if (delegate) {
186 View* titlebar_view = delegate->CreateTitlebarExtraView(); 186 View* titlebar_view = delegate->CreateTitlebarExtraView();
187 if (titlebar_view) 187 if (titlebar_view)
188 frame->SetTitlebarExtraView(titlebar_view); 188 frame->SetTitlebarExtraView(titlebar_view);
189 } 189 }
190 frame->SetShowCloseButton(widget->widget_delegate()->ShouldShowCloseButton()); 190 frame->SetShowCloseButton(widget->widget_delegate()->ShouldShowCloseButton());
191 frame->set_can_drag(true);
192 if (force_opaque_border) 191 if (force_opaque_border)
193 widget->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM); 192 widget->set_frame_type(views::Widget::FRAME_TYPE_FORCE_CUSTOM);
194 return frame; 193 return frame;
195 } 194 }
196 195
197 const DialogClientView* DialogDelegate::GetDialogClientView() const { 196 const DialogClientView* DialogDelegate::GetDialogClientView() const {
198 return GetWidget()->client_view()->AsDialogClientView(); 197 return GetWidget()->client_view()->AsDialogClientView();
199 } 198 }
200 199
201 DialogClientView* DialogDelegate::GetDialogClientView() { 200 DialogClientView* DialogDelegate::GetDialogClientView() {
(...skipping 24 matching lines...) Expand all
226 225
227 const Widget* DialogDelegateView::GetWidget() const { 226 const Widget* DialogDelegateView::GetWidget() const {
228 return View::GetWidget(); 227 return View::GetWidget();
229 } 228 }
230 229
231 View* DialogDelegateView::GetContentsView() { 230 View* DialogDelegateView::GetContentsView() {
232 return this; 231 return this;
233 } 232 }
234 233
235 } // namespace views 234 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698