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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 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 "chrome/browser/ui/views/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 break; 207 break;
208 #if defined(USE_ASH) 208 #if defined(USE_ASH)
209 case chrome::HOST_DESKTOP_TYPE_ASH: 209 case chrome::HOST_DESKTOP_TYPE_ASH:
210 // If we're in ash, give this window the context of the main monitor. 210 // If we're in ash, give this window the context of the main monitor.
211 params->context = ash::Shell::GetPrimaryRootWindow(); 211 params->context = ash::Shell::GetPrimaryRootWindow();
212 break; 212 break;
213 #endif 213 #endif
214 default: 214 default:
215 NOTREACHED(); 215 NOTREACHED();
216 } 216 }
217 #if defined(OS_WIN) && defined(USE_AURA)
sky 2013/03/14 20:06:37 Why is this windows specific, don't we want it for
scottmg 2013/03/14 22:51:53 I'm not clear on what's possible on Linux. I don't
218 } else if (params->parent &&
219 (params->type == views::Widget::InitParams::TYPE_CONTROL ||
220 params->type == views::Widget::InitParams::TYPE_WINDOW)) {
221 #else
217 } else if (params->parent && 222 } else if (params->parent &&
218 params->type != views::Widget::InitParams::TYPE_MENU) { 223 params->type != views::Widget::InitParams::TYPE_MENU) {
224 #endif
219 params->native_widget = new views::NativeWidgetAura(delegate); 225 params->native_widget = new views::NativeWidgetAura(delegate);
220 } else if (params->type != views::Widget::InitParams::TYPE_TOOLTIP) { 226 } else if (params->type != views::Widget::InitParams::TYPE_TOOLTIP) {
221 // TODO(erg): Once we've threaded context to everywhere that needs it, we 227 // TODO(erg): Once we've threaded context to everywhere that needs it, we
222 // should remove this check here. 228 // should remove this check here.
223 gfx::NativeView to_check = 229 gfx::NativeView to_check =
224 params->context ? params->context : params->parent; 230 params->context ? params->context : params->parent;
225 if (chrome::GetHostDesktopTypeForNativeView(to_check) == 231 if (chrome::GetHostDesktopTypeForNativeView(to_check) ==
226 chrome::HOST_DESKTOP_TYPE_NATIVE) { 232 chrome::HOST_DESKTOP_TYPE_NATIVE) {
227 params->native_widget = new views::DesktopNativeWidgetAura(delegate); 233 params->native_widget = new views::DesktopNativeWidgetAura(delegate);
228 } 234 }
229 } 235 }
230 #endif 236 #endif
231 } 237 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | ui/aura/root_window_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698