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

Unified Diff: ui/views/widget/tooltip_manager.cc

Issue 916423002: Tooltip Cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build fix Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/tooltip_manager.h ('k') | ui/views/widget/tooltip_manager_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/tooltip_manager.cc
diff --git a/ui/views/widget/tooltip_manager.cc b/ui/views/widget/tooltip_manager.cc
index b2e68271c1a585dd8e5ef0d4afe199be5869fa2e..c5e641a9cc8d28b402390f9648ce33ec8034b16b 100644
--- a/ui/views/widget/tooltip_manager.cc
+++ b/ui/views/widget/tooltip_manager.cc
@@ -4,33 +4,9 @@
#include "ui/views/widget/tooltip_manager.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/screen.h"
-#include "ui/gfx/text_elider.h"
-
namespace views {
-const size_t kMaxTooltipLength = 1024;
-
// static
const char TooltipManager::kGroupingPropertyKey[] = "GroupingPropertyKey";
-// static
-int TooltipManager::GetMaxWidth(int x, int y, gfx::NativeView context) {
- return GetMaxWidth(gfx::Screen::GetScreenFor(context)->GetDisplayNearestPoint(
- gfx::Point(x, y)));
-}
-
-// static
-int TooltipManager::GetMaxWidth(const gfx::Display& display) {
- return (display.bounds().width() + 1) / 2;
-}
-
-// static
-void TooltipManager::TrimTooltipText(base::string16* text) {
- // Clamp the tooltip length to kMaxTooltipLength so that we don't
- // accidentally DOS the user with a mega tooltip.
- *text = gfx::TruncateString(*text, kMaxTooltipLength, gfx::WORD_BREAK);
-}
-
} // namespace views
« no previous file with comments | « ui/views/widget/tooltip_manager.h ('k') | ui/views/widget/tooltip_manager_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698