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

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

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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/web_notification/web_notification_tray.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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // If we come here from UpdateTooltip(), we have already checked for tooltip 402 // If we come here from UpdateTooltip(), we have already checked for tooltip
403 // visibility and this check below will have no effect. 403 // visibility and this check below will have no effect.
404 if (tooltip_text_ != tooltip_text || !tooltip_->IsVisible()) { 404 if (tooltip_text_ != tooltip_text || !tooltip_->IsVisible()) {
405 tooltip_text_ = tooltip_text; 405 tooltip_text_ = tooltip_text;
406 if (tooltip_text_.empty()) { 406 if (tooltip_text_.empty()) {
407 tooltip_->Hide(); 407 tooltip_->Hide();
408 } else { 408 } else {
409 string16 tooltip_text(tooltip_text_); 409 string16 tooltip_text(tooltip_text_);
410 gfx::Point widget_loc = curr_mouse_loc_; 410 gfx::Point widget_loc = curr_mouse_loc_;
411 widget_loc = widget_loc.Add( 411 widget_loc = widget_loc.Add(
412 tooltip_window_->GetScreenBounds().origin()); 412 tooltip_window_->GetBoundsInScreen().origin());
413 tooltip_->SetText(tooltip_text, widget_loc); 413 tooltip_->SetText(tooltip_text, widget_loc);
414 tooltip_->Show(); 414 tooltip_->Show();
415 } 415 }
416 } 416 }
417 } 417 }
418 418
419 bool TooltipController::IsTooltipVisible() { 419 bool TooltipController::IsTooltipVisible() {
420 return tooltip_->IsVisible(); 420 return tooltip_->IsVisible();
421 } 421 }
422 422
423 bool TooltipController::IsDragDropInProgress() { 423 bool TooltipController::IsDragDropInProgress() {
424 return drag_drop_client_->IsDragDropInProgress(); 424 return drag_drop_client_->IsDragDropInProgress();
425 } 425 }
426 426
427 } // namespace internal 427 } // namespace internal
428 } // namespace ash 428 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | ash/wm/app_list_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698