OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/views/test/test_tooltip_client.h" | |
6 | |
7 #include "ui/base/resource/resource_bundle.h" | |
8 #include "ui/gfx/font.h" | |
9 #include "ui/gfx/point.h" | |
10 #include "ui/gfx/rect.h" | |
11 #include "ui/gfx/screen.h" | |
12 | |
13 namespace aura { | |
14 | |
15 #if defined(USE_AURA) | |
Ben Goodger (Google)
2011/12/01 17:55:40
we shouldn't be doing this in aura files.
Rather,
| |
16 | |
17 // static | |
18 gfx::Font TooltipClient::GetDefaultFont() { | |
19 return ui::ResourceBundle::GetSharedInstance().GetFont( | |
20 ui::ResourceBundle::BaseFont); | |
21 } | |
22 | |
23 // static | |
24 int TooltipClient::GetMaxWidth(int x, int y) { | |
25 gfx::Rect monitor_bounds = | |
26 gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y)); | |
27 return (monitor_bounds.width() + 1) / 2; | |
28 } | |
29 | |
30 #endif | |
31 | |
32 } // namespace aura | |
OLD | NEW |