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

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

Issue 11419274: Remove CursorManager::cursor_visible(), which is no longer necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « no previous file | ash/wm/cursor_manager.h » ('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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 GetTooltip()->Hide(); 426 GetTooltip()->Hide();
427 427
428 // Since the user presumably no longer needs the tooltip, we also stop the 428 // Since the user presumably no longer needs the tooltip, we also stop the
429 // tooltip timer so that tooltip does not pop back up. We will restart this 429 // tooltip timer so that tooltip does not pop back up. We will restart this
430 // timer if the tooltip changes (see UpdateTooltip()). 430 // timer if the tooltip changes (see UpdateTooltip()).
431 tooltip_timer_.Stop(); 431 tooltip_timer_.Stop();
432 } 432 }
433 433
434 void TooltipController::UpdateIfRequired() { 434 void TooltipController::UpdateIfRequired() {
435 if (!tooltips_enabled_ || mouse_pressed_ || IsDragDropInProgress() || 435 if (!tooltips_enabled_ || mouse_pressed_ || IsDragDropInProgress() ||
436 !ash::Shell::GetInstance()->cursor_manager()->cursor_visible()) { 436 !ash::Shell::GetInstance()->cursor_manager()->IsCursorVisible()) {
437 GetTooltip()->Hide(); 437 GetTooltip()->Hide();
438 return; 438 return;
439 } 439 }
440 440
441 string16 tooltip_text; 441 string16 tooltip_text;
442 if (tooltip_window_) 442 if (tooltip_window_)
443 tooltip_text = aura::client::GetTooltipText(tooltip_window_); 443 tooltip_text = aura::client::GetTooltipText(tooltip_window_);
444 444
445 // If the user pressed a mouse button. We will hide the tooltip and not show 445 // If the user pressed a mouse button. We will hide the tooltip and not show
446 // it until there is a change in the tooltip. 446 // it until there is a change in the tooltip.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 485 }
486 486
487 TooltipController::Tooltip* TooltipController::GetTooltip() { 487 TooltipController::Tooltip* TooltipController::GetTooltip() {
488 if (!tooltip_.get()) 488 if (!tooltip_.get())
489 tooltip_.reset(new Tooltip(this)); 489 tooltip_.reset(new Tooltip(this));
490 return tooltip_.get(); 490 return tooltip_.get();
491 } 491 }
492 492
493 } // namespace internal 493 } // namespace internal
494 } // namespace ash 494 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/cursor_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698