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

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

Issue 387993004: MacViews: Change Widget context type to NativeWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
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/views/bubble/bubble_border.h" 10 #include "ui/views/bubble/bubble_border.h"
(...skipping 13 matching lines...) Expand all
24 // DialogDelegate: 24 // DialogDelegate:
25 25
26 DialogDelegate::DialogDelegate() : supports_new_style_(true) { 26 DialogDelegate::DialogDelegate() : supports_new_style_(true) {
27 } 27 }
28 28
29 DialogDelegate::~DialogDelegate() { 29 DialogDelegate::~DialogDelegate() {
30 } 30 }
31 31
32 // static 32 // static
33 Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, 33 Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
34 gfx::NativeView context, 34 gfx::NativeWindow context,
35 gfx::NativeView parent) { 35 gfx::NativeView parent) {
36 views::Widget* widget = new views::Widget; 36 views::Widget* widget = new views::Widget;
37 views::Widget::InitParams params; 37 views::Widget::InitParams params;
38 params.delegate = delegate; 38 params.delegate = delegate;
39 DialogDelegate* dialog = delegate->AsDialogDelegate(); 39 DialogDelegate* dialog = delegate->AsDialogDelegate();
40 40
41 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 41 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
42 // The new style doesn't support unparented dialogs on Linux desktop. 42 // The new style doesn't support unparented dialogs on Linux desktop.
43 if (dialog) 43 if (dialog)
44 dialog->supports_new_style_ &= parent != NULL; 44 dialog->supports_new_style_ &= parent != NULL;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 const Widget* DialogDelegateView::GetWidget() const { 224 const Widget* DialogDelegateView::GetWidget() const {
225 return View::GetWidget(); 225 return View::GetWidget();
226 } 226 }
227 227
228 View* DialogDelegateView::GetContentsView() { 228 View* DialogDelegateView::GetContentsView() {
229 return this; 229 return this;
230 } 230 }
231 231
232 } // namespace views 232 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698