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

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

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 params.keep_on_top = true; 114 params.keep_on_top = true;
115 params.accept_events = false; 115 params.accept_events = false;
116 params.transparent = true; 116 params.transparent = true;
117 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 117 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
118 widget->Init(params); 118 widget->Init(params);
119 return widget; 119 return widget;
120 } 120 }
121 121
122 } // namespace 122 } // namespace
123 123
124 namespace aura_shell { 124 namespace ash {
125 namespace internal { 125 namespace internal {
126 126
127 // Displays a widget with tooltip using a views::Label. 127 // Displays a widget with tooltip using a views::Label.
128 class TooltipController::Tooltip { 128 class TooltipController::Tooltip {
129 public: 129 public:
130 Tooltip() { 130 Tooltip() {
131 label_.set_background( 131 label_.set_background(
132 views::Background::CreateSolidBackground(kTooltipBackground)); 132 views::Background::CreateSolidBackground(kTooltipBackground));
133 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) { 133 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) {
134 label_.set_border( 134 label_.set_border(
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 string16 tooltip_text(tooltip_text_); 286 string16 tooltip_text(tooltip_text_);
287 gfx::Point widget_loc = curr_mouse_loc_; 287 gfx::Point widget_loc = curr_mouse_loc_;
288 widget_loc = widget_loc.Add(tooltip_window_->GetScreenBounds().origin()); 288 widget_loc = widget_loc.Add(tooltip_window_->GetScreenBounds().origin());
289 tooltip_->SetText(tooltip_text, widget_loc); 289 tooltip_->SetText(tooltip_text, widget_loc);
290 tooltip_->Show(); 290 tooltip_->Show();
291 } 291 }
292 } 292 }
293 } 293 }
294 294
295 } // namespace internal 295 } // namespace internal
296 } // namespace aura_shell 296 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698