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

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

Issue 274273004: Use the native frame for the task manager on Linux Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed mgiuca@'s nits Created 6 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
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 16 matching lines...) Expand all
27 Widget* DialogDelegate::CreateDialogWidget(DialogDelegate* dialog, 27 Widget* DialogDelegate::CreateDialogWidget(DialogDelegate* dialog,
28 gfx::NativeView context, 28 gfx::NativeView context,
29 gfx::NativeView parent) { 29 gfx::NativeView parent) {
30 views::Widget* widget = new views::Widget; 30 views::Widget* widget = new views::Widget;
31 views::Widget::InitParams params; 31 views::Widget::InitParams params;
32 params.delegate = dialog; 32 params.delegate = dialog;
33 if (!dialog || dialog->UseNewStyleForThisDialog()) { 33 if (!dialog || dialog->UseNewStyleForThisDialog()) {
34 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW; 34 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW;
35 params.remove_standard_frame = true; 35 params.remove_standard_frame = true;
36 } 36 }
37 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
38 // Dialogs on Linux always have custom frames.
39 params.remove_standard_frame = true;
40 #endif
41 params.context = context; 37 params.context = context;
42 params.parent = parent; 38 params.parent = parent;
43 params.top_level = true; 39 params.top_level = true;
44 widget->Init(params); 40 widget->Init(params);
45 return widget; 41 return widget;
46 } 42 }
47 43
48 View* DialogDelegate::CreateExtraView() { 44 View* DialogDelegate::CreateExtraView() {
49 return NULL; 45 return NULL;
50 } 46 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 203
208 const Widget* DialogDelegateView::GetWidget() const { 204 const Widget* DialogDelegateView::GetWidget() const {
209 return View::GetWidget(); 205 return View::GetWidget();
210 } 206 }
211 207
212 View* DialogDelegateView::GetContentsView() { 208 View* DialogDelegateView::GetContentsView() {
213 return this; 209 return this;
214 } 210 }
215 211
216 } // namespace views 212 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/window/native_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698