OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
piman
2011/12/09 02:53:24
Remove file entirely?
varunjain
2011/12/09 06:43:49
Done.
| |
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/test/test_tooltip_client.h" | 5 #include "ui/views/test/test_tooltip_client.h" |
6 | 6 |
7 #include "ui/base/resource/resource_bundle.h" | 7 #include "ui/base/resource/resource_bundle.h" |
8 #include "ui/gfx/font.h" | 8 #include "ui/gfx/font.h" |
9 #include "ui/gfx/point.h" | 9 #include "ui/gfx/point.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
11 #include "ui/gfx/screen.h" | 11 #include "ui/gfx/screen.h" |
12 | 12 |
13 namespace aura { | 13 namespace aura { |
14 | 14 |
15 // static | |
16 gfx::Font TooltipClient::GetDefaultFont() { | |
17 return ui::ResourceBundle::GetSharedInstance().GetFont( | |
18 ui::ResourceBundle::BaseFont); | |
19 } | |
20 | |
21 // static | |
22 int TooltipClient::GetMaxWidth(int x, int y) { | |
23 gfx::Rect monitor_bounds = | |
24 gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y)); | |
25 return (monitor_bounds.width() + 1) / 2; | |
26 } | |
27 | |
28 } // namespace aura | 15 } // namespace aura |
OLD | NEW |