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

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

Issue 290573003: Make tooltips toplevel windows on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_window_tree_host_x11.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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 return type == InitParams::TYPE_WINDOW || 323 return type == InitParams::TYPE_WINDOW ||
324 type == InitParams::TYPE_PANEL || 324 type == InitParams::TYPE_PANEL ||
325 type == InitParams::TYPE_BUBBLE; 325 type == InitParams::TYPE_BUBBLE;
326 } 326 }
327 327
328 void Widget::Init(const InitParams& in_params) { 328 void Widget::Init(const InitParams& in_params) {
329 TRACE_EVENT0("views", "Widget::Init"); 329 TRACE_EVENT0("views", "Widget::Init");
330 InitParams params = in_params; 330 InitParams params = in_params;
331 331
332 params.child |= (params.type == InitParams::TYPE_CONTROL); 332 params.child |= (params.type == InitParams::TYPE_CONTROL);
333 is_top_level_ = (!params.child && params.type != InitParams::TYPE_TOOLTIP); 333 is_top_level_ = !params.child;
334 334
335 if (params.opacity == views::Widget::InitParams::INFER_OPACITY && 335 if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
336 params.type != views::Widget::InitParams::TYPE_WINDOW && 336 params.type != views::Widget::InitParams::TYPE_WINDOW &&
337 params.type != views::Widget::InitParams::TYPE_PANEL) 337 params.type != views::Widget::InitParams::TYPE_PANEL)
338 params.opacity = views::Widget::InitParams::OPAQUE_WINDOW; 338 params.opacity = views::Widget::InitParams::OPAQUE_WINDOW;
339 339
340 if (ViewsDelegate::views_delegate) 340 if (ViewsDelegate::views_delegate)
341 ViewsDelegate::views_delegate->OnBeforeWidgetInit(&params, this); 341 ViewsDelegate::views_delegate->OnBeforeWidgetInit(&params, this);
342 342
343 if (params.opacity == views::Widget::InitParams::INFER_OPACITY) 343 if (params.opacity == views::Widget::InitParams::INFER_OPACITY)
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 1505
1506 //////////////////////////////////////////////////////////////////////////////// 1506 ////////////////////////////////////////////////////////////////////////////////
1507 // internal::NativeWidgetPrivate, NativeWidget implementation: 1507 // internal::NativeWidgetPrivate, NativeWidget implementation:
1508 1508
1509 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1509 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1510 return this; 1510 return this;
1511 } 1511 }
1512 1512
1513 } // namespace internal 1513 } // namespace internal
1514 } // namespace views 1514 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698