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

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, 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/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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return type == InitParams::TYPE_WINDOW || 329 return type == InitParams::TYPE_WINDOW ||
330 type == InitParams::TYPE_PANEL || 330 type == InitParams::TYPE_PANEL ||
331 type == InitParams::TYPE_BUBBLE; 331 type == InitParams::TYPE_BUBBLE;
332 } 332 }
333 333
334 void Widget::Init(const InitParams& in_params) { 334 void Widget::Init(const InitParams& in_params) {
335 TRACE_EVENT0("views", "Widget::Init"); 335 TRACE_EVENT0("views", "Widget::Init");
336 InitParams params = in_params; 336 InitParams params = in_params;
337 337
338 params.child |= (params.type == InitParams::TYPE_CONTROL); 338 params.child |= (params.type == InitParams::TYPE_CONTROL);
339 is_top_level_ = (!params.child && params.type != InitParams::TYPE_TOOLTIP); 339 is_top_level_ = !params.child;
340 340
341 if (params.activatable != InitParams::ACTIVATABLE_DEFAULT) { 341 if (params.activatable != InitParams::ACTIVATABLE_DEFAULT) {
342 can_activate_ = (params.activatable == InitParams::ACTIVATABLE_YES); 342 can_activate_ = (params.activatable == InitParams::ACTIVATABLE_YES);
343 } else if (params.type != InitParams::TYPE_CONTROL && 343 } else if (params.type != InitParams::TYPE_CONTROL &&
344 params.type != InitParams::TYPE_POPUP && 344 params.type != InitParams::TYPE_POPUP &&
345 params.type != InitParams::TYPE_MENU && 345 params.type != InitParams::TYPE_MENU &&
346 params.type != InitParams::TYPE_TOOLTIP && 346 params.type != InitParams::TYPE_TOOLTIP &&
347 params.type != InitParams::TYPE_DRAG) { 347 params.type != InitParams::TYPE_DRAG) {
348 can_activate_ = true; 348 can_activate_ = true;
349 params.activatable = InitParams::ACTIVATABLE_YES; 349 params.activatable = InitParams::ACTIVATABLE_YES;
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 1516
1517 //////////////////////////////////////////////////////////////////////////////// 1517 ////////////////////////////////////////////////////////////////////////////////
1518 // internal::NativeWidgetPrivate, NativeWidget implementation: 1518 // internal::NativeWidgetPrivate, NativeWidget implementation:
1519 1519
1520 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1520 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1521 return this; 1521 return this;
1522 } 1522 }
1523 1523
1524 } // namespace internal 1524 } // namespace internal
1525 } // namespace views 1525 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698