Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: ash/shelf/overflow_bubble_view.cc

Issue 198063003: Revert of Shelf Cleanup (- binary files) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shelf/app_list_button.cc ('k') | ash/shelf/overflow_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_constants.h" 10 #include "ash/shelf/shelf_constants.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 180
181 gfx::Rect OverflowBubbleView::GetBubbleBounds() { 181 gfx::Rect OverflowBubbleView::GetBubbleBounds() {
182 views::BubbleBorder* border = GetBubbleFrameView()->bubble_border(); 182 views::BubbleBorder* border = GetBubbleFrameView()->bubble_border();
183 gfx::Insets bubble_insets = border->GetInsets(); 183 gfx::Insets bubble_insets = border->GetInsets();
184 184
185 const int border_size = 185 const int border_size =
186 views::BubbleBorder::is_arrow_on_horizontal(arrow()) ? 186 views::BubbleBorder::is_arrow_on_horizontal(arrow()) ?
187 bubble_insets.left() : bubble_insets.top(); 187 bubble_insets.left() : bubble_insets.top();
188 const int arrow_offset = border_size + kPadding + kShelfViewLeadingInset + 188 const int arrow_offset = border_size + kPadding + kShelfViewLeadingInset +
189 kShelfSize / 2; 189 ShelfLayoutManager::GetPreferredShelfSize() / 2;
190 190
191 const gfx::Size content_size = GetPreferredSize(); 191 const gfx::Size content_size = GetPreferredSize();
192 border->set_arrow_offset(arrow_offset); 192 border->set_arrow_offset(arrow_offset);
193 193
194 const gfx::Rect anchor_rect = GetAnchorRect(); 194 const gfx::Rect anchor_rect = GetAnchorRect();
195 gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds( 195 gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds(
196 anchor_rect, 196 anchor_rect,
197 content_size, 197 content_size,
198 false); 198 false);
199 199
(...skipping 18 matching lines...) Expand all
218 bubble_rect.Offset(0, offset); 218 bubble_rect.Offset(0, offset);
219 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 219 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
220 } 220 }
221 221
222 GetBubbleFrameView()->SchedulePaint(); 222 GetBubbleFrameView()->SchedulePaint();
223 return bubble_rect; 223 return bubble_rect;
224 } 224 }
225 225
226 } // namespace internal 226 } // namespace internal
227 } // namespace ash 227 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/app_list_button.cc ('k') | ash/shelf/overflow_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698