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

Side by Side Diff: ash/tooltips/tooltip_controller.cc

Issue 10384068: views: Have a more accurate name for View parent_owned accessors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 "ash/tooltips/tooltip_controller.h" 5 #include "ash/tooltips/tooltip_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 class TooltipController::Tooltip { 92 class TooltipController::Tooltip {
93 public: 93 public:
94 Tooltip() { 94 Tooltip() {
95 label_.set_background( 95 label_.set_background(
96 views::Background::CreateSolidBackground(kTooltipBackground)); 96 views::Background::CreateSolidBackground(kTooltipBackground));
97 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) { 97 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) {
98 label_.set_border( 98 label_.set_border(
99 views::Border::CreateSolidBorder(kTooltipBorderWidth, 99 views::Border::CreateSolidBorder(kTooltipBorderWidth,
100 kTooltipBorder)); 100 kTooltipBorder));
101 } 101 }
102 label_.set_parent_owned(false); 102 label_.set_owned_by_client();
103 widget_.reset(CreateTooltip()); 103 widget_.reset(CreateTooltip());
104 widget_->SetContentsView(&label_); 104 widget_->SetContentsView(&label_);
105 widget_->Activate(); 105 widget_->Activate();
106 } 106 }
107 107
108 ~Tooltip() { 108 ~Tooltip() {
109 widget_->Close(); 109 widget_->Close();
110 } 110 }
111 111
112 // Updates the text on the tooltip and resizes to fit. 112 // Updates the text on the tooltip and resizes to fit.
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 bool TooltipController::IsDragDropInProgress() { 420 bool TooltipController::IsDragDropInProgress() {
421 aura::client::DragDropClient* client = aura::client::GetDragDropClient( 421 aura::client::DragDropClient* client = aura::client::GetDragDropClient(
422 Shell::GetRootWindow()); 422 Shell::GetRootWindow());
423 if (client) 423 if (client)
424 return client->IsDragDropInProgress(); 424 return client->IsDragDropInProgress();
425 return false; 425 return false;
426 } 426 }
427 427
428 } // namespace internal 428 } // namespace internal
429 } // namespace ash 429 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_image_view.cc ('k') | chrome/browser/chromeos/input_method/candidate_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698