OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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/pinned_contents_info_bubble.h" | 5 #include "chrome/browser/ui/views/pinned_contents_info_bubble.h" |
6 | 6 |
7 #include "chrome/browser/views/bubble_border.h" | 7 #include "chrome/browser/ui/views/bubble_border.h" |
8 | 8 |
9 void PinnedContentsBorderContents::SizeAndGetBounds( | 9 void PinnedContentsBorderContents::SizeAndGetBounds( |
10 const gfx::Rect& position_relative_to, | 10 const gfx::Rect& position_relative_to, |
11 BubbleBorder::ArrowLocation arrow_location, | 11 BubbleBorder::ArrowLocation arrow_location, |
12 bool allow_bubble_offscreen, | 12 bool allow_bubble_offscreen, |
13 const gfx::Size& contents_size, | 13 const gfx::Size& contents_size, |
14 gfx::Rect* contents_bounds, | 14 gfx::Rect* contents_bounds, |
15 gfx::Rect* window_bounds) { | 15 gfx::Rect* window_bounds) { |
16 // Arrow offset is calculated from the middle of the |position_relative_to|. | 16 // Arrow offset is calculated from the middle of the |position_relative_to|. |
17 int offset = position_relative_to.x() + (position_relative_to.width() / 2); | 17 int offset = position_relative_to.x() + (position_relative_to.width() / 2); |
(...skipping 26 matching lines...) Expand all Loading... |
44 PinnedContentsInfoBubble* window = | 44 PinnedContentsInfoBubble* window = |
45 new PinnedContentsInfoBubble(bubble_anchor); | 45 new PinnedContentsInfoBubble(bubble_anchor); |
46 window->Init(parent, position_relative_to, arrow_location, | 46 window->Init(parent, position_relative_to, arrow_location, |
47 contents, delegate); | 47 contents, delegate); |
48 return window; | 48 return window; |
49 } | 49 } |
50 | 50 |
51 BorderContents* PinnedContentsInfoBubble::CreateBorderContents() { | 51 BorderContents* PinnedContentsInfoBubble::CreateBorderContents() { |
52 return new PinnedContentsBorderContents(bubble_anchor_); | 52 return new PinnedContentsBorderContents(bubble_anchor_); |
53 } | 53 } |
OLD | NEW |