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

Side by Side Diff: ui/views/corewm/tooltip_aura.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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/controls/textfield/textfield.cc ('k') | ui/views/examples/button_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/corewm/tooltip_aura.h" 5 #include "ui/views/corewm/tooltip_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 namespace views { 59 namespace views {
60 namespace corewm { 60 namespace corewm {
61 61
62 TooltipAura::TooltipAura(gfx::ScreenType screen_type) 62 TooltipAura::TooltipAura(gfx::ScreenType screen_type)
63 : screen_type_(screen_type), 63 : screen_type_(screen_type),
64 widget_(NULL), 64 widget_(NULL),
65 tooltip_window_(NULL) { 65 tooltip_window_(NULL) {
66 label_.set_background( 66 label_.set_background(
67 views::Background::CreateSolidBackground(kTooltipBackground)); 67 views::Background::CreateSolidBackground(kTooltipBackground));
68 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoDropShadows)) { 68 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoDropShadows)) {
69 label_.set_border( 69 label_.SetBorder(
70 views::Border::CreateSolidBorder(kTooltipBorderWidth, 70 views::Border::CreateSolidBorder(kTooltipBorderWidth, kTooltipBorder));
71 kTooltipBorder));
72 } 71 }
73 label_.set_owned_by_client(); 72 label_.set_owned_by_client();
74 label_.SetMultiLine(true); 73 label_.SetMultiLine(true);
75 } 74 }
76 75
77 TooltipAura::~TooltipAura() { 76 TooltipAura::~TooltipAura() {
78 DestroyWidget(); 77 DestroyWidget();
79 } 78 }
80 79
81 // static 80 // static
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 263 }
265 264
266 void TooltipAura::OnWidgetDestroying(views::Widget* widget) { 265 void TooltipAura::OnWidgetDestroying(views::Widget* widget) {
267 DCHECK_EQ(widget_, widget); 266 DCHECK_EQ(widget_, widget);
268 widget_ = NULL; 267 widget_ = NULL;
269 tooltip_window_ = NULL; 268 tooltip_window_ = NULL;
270 } 269 }
271 270
272 } // namespace corewm 271 } // namespace corewm
273 } // namespace views 272 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/examples/button_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698