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

Side by Side Diff: ui/views/corewm/tooltip_controller_test_helper.cc

Issue 2643973002: Revert of Remove unnecessary spin in ToolTipController (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/views/corewm/tooltip_controller_test_helper.h" 5 #include "ui/views/corewm/tooltip_controller_test_helper.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/views/corewm/tooltip_controller.h" 8 #include "ui/views/corewm/tooltip_controller.h"
9 9
10 namespace views { 10 namespace views {
11 namespace corewm { 11 namespace corewm {
12 namespace test { 12 namespace test {
13 13
14 TooltipControllerTestHelper::TooltipControllerTestHelper( 14 TooltipControllerTestHelper::TooltipControllerTestHelper(
15 TooltipController* controller) 15 TooltipController* controller)
16 : controller_(controller) { 16 : controller_(controller) {
17 } 17 }
18 18
19 TooltipControllerTestHelper::~TooltipControllerTestHelper() { 19 TooltipControllerTestHelper::~TooltipControllerTestHelper() {
20 } 20 }
21 21
22 base::string16 TooltipControllerTestHelper::GetTooltipText() { 22 base::string16 TooltipControllerTestHelper::GetTooltipText() {
23 return controller_->tooltip_text_; 23 return controller_->tooltip_text_;
24 } 24 }
25 25
26 aura::Window* TooltipControllerTestHelper::GetTooltipWindow() { 26 aura::Window* TooltipControllerTestHelper::GetTooltipWindow() {
27 return controller_->tooltip_window_; 27 return controller_->tooltip_window_;
28 } 28 }
29 29
30 void TooltipControllerTestHelper::UpdateIfRequired() { 30 void TooltipControllerTestHelper::FireTooltipTimer() {
31 controller_->UpdateIfRequired(); 31 controller_->TooltipTimerFired();
32 }
33
34 bool TooltipControllerTestHelper::IsTooltipTimerRunning() {
35 return controller_->tooltip_timer_.IsRunning();
32 } 36 }
33 37
34 void TooltipControllerTestHelper::FireTooltipShownTimer() { 38 void TooltipControllerTestHelper::FireTooltipShownTimer() {
35 controller_->tooltip_shown_timer_.Stop(); 39 controller_->tooltip_shown_timer_.Stop();
36 controller_->TooltipShownTimerFired(); 40 controller_->TooltipShownTimerFired();
37 } 41 }
38 42
39 bool TooltipControllerTestHelper::IsTooltipShownTimerRunning() { 43 bool TooltipControllerTestHelper::IsTooltipShownTimerRunning() {
40 return controller_->tooltip_shown_timer_.IsRunning(); 44 return controller_->tooltip_shown_timer_.IsRunning();
41 } 45 }
(...skipping 10 matching lines...) Expand all
52 56
53 bool TooltipTestView::GetTooltipText(const gfx::Point& p, 57 bool TooltipTestView::GetTooltipText(const gfx::Point& p,
54 base::string16* tooltip) const { 58 base::string16* tooltip) const {
55 *tooltip = tooltip_text_; 59 *tooltip = tooltip_text_;
56 return true; 60 return true;
57 } 61 }
58 62
59 } // namespace test 63 } // namespace test
60 } // namespace corewm 64 } // namespace corewm
61 } // namespace views 65 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/tooltip_controller_test_helper.h ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698