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

Side by Side Diff: ui/views/widget/widget.cc

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.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/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 void Widget::Init(const InitParams& in_params) { 340 void Widget::Init(const InitParams& in_params) {
341 TRACE_EVENT0("views", "Widget::Init"); 341 TRACE_EVENT0("views", "Widget::Init");
342 InitParams params = in_params; 342 InitParams params = in_params;
343 343
344 is_top_level_ = params.top_level || 344 is_top_level_ = params.top_level ||
345 (!params.child && 345 (!params.child &&
346 params.type != InitParams::TYPE_CONTROL && 346 params.type != InitParams::TYPE_CONTROL &&
347 params.type != InitParams::TYPE_TOOLTIP); 347 params.type != InitParams::TYPE_TOOLTIP);
348 params.top_level = is_top_level_; 348 params.top_level = is_top_level_;
349 #if defined(OS_WIN) && defined(USE_AURA)
350 // It'll need to be faded in if it's top level and not the main window.
351 params.transparent = is_top_level_ && params.type != InitParams::TYPE_WINDOW;
352 #endif
349 353
350 if (ViewsDelegate::views_delegate) 354 if (ViewsDelegate::views_delegate)
351 ViewsDelegate::views_delegate->OnBeforeWidgetInit(&params, this); 355 ViewsDelegate::views_delegate->OnBeforeWidgetInit(&params, this);
352 356
353 widget_delegate_ = params.delegate ? 357 widget_delegate_ = params.delegate ?
354 params.delegate : new DefaultWidgetDelegate(this, params); 358 params.delegate : new DefaultWidgetDelegate(this, params);
355 ownership_ = params.ownership; 359 ownership_ = params.ownership;
356 native_widget_ = CreateNativeWidget(params.native_widget, this)-> 360 native_widget_ = CreateNativeWidget(params.native_widget, this)->
357 AsNativeWidgetPrivate(); 361 AsNativeWidgetPrivate();
358 root_view_.reset(CreateRootView()); 362 root_view_.reset(CreateRootView());
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 1425
1422 //////////////////////////////////////////////////////////////////////////////// 1426 ////////////////////////////////////////////////////////////////////////////////
1423 // internal::NativeWidgetPrivate, NativeWidget implementation: 1427 // internal::NativeWidgetPrivate, NativeWidget implementation:
1424 1428
1425 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1429 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1426 return this; 1430 return this;
1427 } 1431 }
1428 1432
1429 } // namespace internal 1433 } // namespace internal
1430 } // namespace views 1434 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698