OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
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 "chrome/browser/views/info_bubble.h" | 5 #include "chrome/browser/views/info_bubble.h" |
6 | 6 |
7 #include "app/gfx/chrome_canvas.h" | 7 #include "app/gfx/chrome_canvas.h" |
8 #include "app/gfx/path.h" | 8 #include "app/gfx/path.h" |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "app/win_util.h" |
10 #include "base/win_util.h" | 11 #include "base/win_util.h" |
11 #include "chrome/browser/browser_window.h" | 12 #include "chrome/browser/browser_window.h" |
12 #include "chrome/browser/views/frame/browser_view.h" | 13 #include "chrome/browser/views/frame/browser_view.h" |
13 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
14 #include "chrome/common/notification_type.h" | 15 #include "chrome/common/notification_type.h" |
15 #include "chrome/common/win_util.h" | |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
17 #include "views/widget/root_view.h" | 17 #include "views/widget/root_view.h" |
18 #include "views/window/window.h" | 18 #include "views/window/window.h" |
19 | 19 |
20 using views::View; | 20 using views::View; |
21 | 21 |
22 // All sizes are in pixels. | 22 // All sizes are in pixels. |
23 | 23 |
24 // Size of the border, along each edge. | 24 // Size of the border, along each edge. |
25 static const int kBorderSize = 1; | 25 static const int kBorderSize = 1; |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 x -= kArrowXOffset; | 427 x -= kArrowXOffset; |
428 else | 428 else |
429 x = x + kArrowXOffset - pref.width(); | 429 x = x + kArrowXOffset - pref.width(); |
430 if (IsTop()) { | 430 if (IsTop()) { |
431 y = position_relative_to.bottom() + kArrowToContentPadding; | 431 y = position_relative_to.bottom() + kArrowToContentPadding; |
432 } else { | 432 } else { |
433 y = position_relative_to.y() - kArrowToContentPadding - pref.height(); | 433 y = position_relative_to.y() - kArrowToContentPadding - pref.height(); |
434 } | 434 } |
435 return gfx::Rect(x, y, pref.width(), pref.height()); | 435 return gfx::Rect(x, y, pref.width(), pref.height()); |
436 } | 436 } |
OLD | NEW |