| OLD | NEW | 
|    1 // Copyright 2013 The Chromium Authors. All rights reserved. |    1 // Copyright 2013 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 "ash/shelf/overflow_bubble_view.h" |    5 #include "ash/shelf/overflow_bubble_view.h" | 
|    6  |    6  | 
|    7 #include <algorithm> |    7 #include <algorithm> | 
|    8  |    8  | 
|    9 #include "ash/root_window_controller.h" |    9 #include "ash/root_window_controller.h" | 
|   10 #include "ash/shelf/shelf.h" |   10 #include "ash/shelf/shelf.h" | 
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  169 } |  169 } | 
|  170  |  170  | 
|  171 gfx::Rect OverflowBubbleView::GetBubbleBounds() { |  171 gfx::Rect OverflowBubbleView::GetBubbleBounds() { | 
|  172   views::BubbleBorder* border = GetBubbleFrameView()->bubble_border(); |  172   views::BubbleBorder* border = GetBubbleFrameView()->bubble_border(); | 
|  173   gfx::Insets bubble_insets = border->GetInsets(); |  173   gfx::Insets bubble_insets = border->GetInsets(); | 
|  174  |  174  | 
|  175   const int border_size = |  175   const int border_size = | 
|  176       views::BubbleBorder::is_arrow_on_horizontal(arrow()) ? |  176       views::BubbleBorder::is_arrow_on_horizontal(arrow()) ? | 
|  177       bubble_insets.left() : bubble_insets.top(); |  177       bubble_insets.left() : bubble_insets.top(); | 
|  178   const int arrow_offset = border_size + kPadding + kShelfViewLeadingInset + |  178   const int arrow_offset = border_size + kPadding + kShelfViewLeadingInset + | 
|  179       kShelfSize / 2; |  179                            GetShelfLayoutConstant(SHELF_SIZE) / 2; | 
|  180  |  180  | 
|  181   const gfx::Size content_size = GetPreferredSize(); |  181   const gfx::Size content_size = GetPreferredSize(); | 
|  182   border->set_arrow_offset(arrow_offset); |  182   border->set_arrow_offset(arrow_offset); | 
|  183  |  183  | 
|  184   const gfx::Rect anchor_rect = GetAnchorRect(); |  184   const gfx::Rect anchor_rect = GetAnchorRect(); | 
|  185   gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds( |  185   gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds( | 
|  186       anchor_rect, |  186       anchor_rect, | 
|  187       content_size, |  187       content_size, | 
|  188       false); |  188       false); | 
|  189  |  189  | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
|  209  |  209  | 
|  210     bubble_rect.Offset(0, offset); |  210     bubble_rect.Offset(0, offset); | 
|  211     border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); |  211     border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); | 
|  212   } |  212   } | 
|  213  |  213  | 
|  214   GetBubbleFrameView()->SchedulePaint(); |  214   GetBubbleFrameView()->SchedulePaint(); | 
|  215   return bubble_rect; |  215   return bubble_rect; | 
|  216 } |  216 } | 
|  217  |  217  | 
|  218 }  // namespace ash |  218 }  // namespace ash | 
| OLD | NEW |