Index: ui/views/test/test_tooltip_client.cc |
diff --git a/ui/views/test/test_tooltip_client.cc b/ui/views/test/test_tooltip_client.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e7ea34d9e4f989edbca6d509b07c465a7c903217 |
--- /dev/null |
+++ b/ui/views/test/test_tooltip_client.cc |
@@ -0,0 +1,28 @@ |
+// 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/test/test_tooltip_client.h" |
+ |
+#include "ui/base/resource/resource_bundle.h" |
+#include "ui/gfx/font.h" |
+#include "ui/gfx/point.h" |
+#include "ui/gfx/rect.h" |
+#include "ui/gfx/screen.h" |
+ |
+namespace aura { |
+ |
+// static |
+gfx::Font TooltipClient::GetDefaultFont() { |
+ return ui::ResourceBundle::GetSharedInstance().GetFont( |
+ ui::ResourceBundle::BaseFont); |
+} |
+ |
+// static |
+int TooltipClient::GetMaxWidth(int x, int y) { |
+ gfx::Rect monitor_bounds = |
+ gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y)); |
+ return (monitor_bounds.width() + 1) / 2; |
+} |
+ |
+} // namespace aura |