| 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/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 9 #include "base/win_util.h" | 10 #include "base/win_util.h" |
| 10 #include "chrome/browser/browser_window.h" | 11 #include "chrome/browser/browser_window.h" |
| 11 #include "chrome/browser/views/frame/browser_view.h" | 12 #include "chrome/browser/views/frame/browser_view.h" |
| 12 #include "chrome/common/gfx/path.h" | |
| 13 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
| 14 #include "chrome/common/notification_type.h" | 14 #include "chrome/common/notification_type.h" |
| 15 #include "chrome/common/win_util.h" | 15 #include "chrome/common/win_util.h" |
| 16 #include "chrome/views/widget/root_view.h" | 16 #include "chrome/views/widget/root_view.h" |
| 17 #include "chrome/views/window/window.h" | 17 #include "chrome/views/window/window.h" |
| 18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.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. |
| (...skipping 404 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 |