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

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

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix round-down problems Created 7 years, 2 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
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 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 bool TooltipControllerTestHelper::IsTooltipShownTimerRunning() { 43 bool TooltipControllerTestHelper::IsTooltipShownTimerRunning() {
44 return controller_->tooltip_shown_timer_.IsRunning(); 44 return controller_->tooltip_shown_timer_.IsRunning();
45 } 45 }
46 46
47 bool TooltipControllerTestHelper::IsTooltipVisible() { 47 bool TooltipControllerTestHelper::IsTooltipVisible() {
48 return controller_->IsTooltipVisible(); 48 return controller_->IsTooltipVisible();
49 } 49 }
50 50
51 // static 51 // static
52 void TooltipControllerTestHelper::TrimTooltipToFit(int max_width, 52 void TooltipControllerTestHelper::TrimTooltipToFit(float max_width,
53 string16* text, 53 string16* text,
54 int* width, 54 float* width,
55 int* line_count) { 55 int* line_count) {
56 TooltipController::TrimTooltipToFit(max_width, text, width, line_count); 56 TooltipController::TrimTooltipToFit(max_width, text, width, line_count);
57 } 57 }
58 58
59 TooltipTestView::TooltipTestView() { 59 TooltipTestView::TooltipTestView() {
60 } 60 }
61 61
62 TooltipTestView::~TooltipTestView() { 62 TooltipTestView::~TooltipTestView() {
63 } 63 }
64 64
65 bool TooltipTestView::GetTooltipText(const gfx::Point& p, 65 bool TooltipTestView::GetTooltipText(const gfx::Point& p,
66 string16* tooltip) const { 66 string16* tooltip) const {
67 *tooltip = tooltip_text_; 67 *tooltip = tooltip_text_;
68 return true; 68 return true;
69 } 69 }
70 70
71 } // namespace test 71 } // namespace test
72 } // namespace corewm 72 } // namespace corewm
73 } // namespace views 73 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698