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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 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
deleted file mode 100644
index 00bd03642a608ab59858483ca8d12f423c331709..0000000000000000000000000000000000000000
--- a/ui/views/widget/tooltip_manager.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/widget/tooltip_manager.h"
-
-#include "ui/gfx/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