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

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

Issue 10546024: Add RootWindowController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « ash/system/status_area_widget.cc ('k') | ash/wm/app_list_controller.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 (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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 label_.set_background( 97 label_.set_background(
98 views::Background::CreateSolidBackground(kTooltipBackground)); 98 views::Background::CreateSolidBackground(kTooltipBackground));
99 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) { 99 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) {
100 label_.set_border( 100 label_.set_border(
101 views::Border::CreateSolidBorder(kTooltipBorderWidth, 101 views::Border::CreateSolidBorder(kTooltipBorderWidth,
102 kTooltipBorder)); 102 kTooltipBorder));
103 } 103 }
104 label_.set_owned_by_client(); 104 label_.set_owned_by_client();
105 widget_.reset(CreateTooltip()); 105 widget_.reset(CreateTooltip());
106 widget_->SetContentsView(&label_); 106 widget_->SetContentsView(&label_);
107 widget_->Activate();
108 } 107 }
109 108
110 ~Tooltip() { 109 ~Tooltip() {
111 widget_->Close(); 110 widget_->Close();
112 } 111 }
113 112
114 // Updates the text on the tooltip and resizes to fit. 113 // Updates the text on the tooltip and resizes to fit.
115 void SetText(string16 tooltip_text, gfx::Point location) { 114 void SetText(string16 tooltip_text, gfx::Point location) {
116 int max_width, line_count; 115 int max_width, line_count;
117 TrimTooltipToFit(&tooltip_text, &max_width, &line_count, 116 TrimTooltipToFit(&tooltip_text, &max_width, &line_count,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 bool TooltipController::IsTooltipVisible() { 419 bool TooltipController::IsTooltipVisible() {
421 return tooltip_->IsVisible(); 420 return tooltip_->IsVisible();
422 } 421 }
423 422
424 bool TooltipController::IsDragDropInProgress() { 423 bool TooltipController::IsDragDropInProgress() {
425 return drag_drop_client_->IsDragDropInProgress(); 424 return drag_drop_client_->IsDragDropInProgress();
426 } 425 }
427 426
428 } // namespace internal 427 } // namespace internal
429 } // namespace ash 428 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/wm/app_list_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698