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

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

Issue 2714853004: Remove non-MD code from overflow button and bubble (Closed)
Patch Set: Rebased Created 3 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
« no previous file with comments | « no previous file | ash/common/shelf/overflow_button.h » ('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/common/shelf/overflow_bubble_view.h" 5 #include "ash/common/shelf/overflow_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 30 matching lines...) Expand all
41 41
42 OverflowBubbleView::~OverflowBubbleView() {} 42 OverflowBubbleView::~OverflowBubbleView() {}
43 43
44 void OverflowBubbleView::InitOverflowBubble(views::View* anchor, 44 void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
45 views::View* shelf_view) { 45 views::View* shelf_view) {
46 shelf_view_ = shelf_view; 46 shelf_view_ = shelf_view;
47 47
48 SetAnchorView(anchor); 48 SetAnchorView(anchor);
49 set_arrow(GetBubbleArrow()); 49 set_arrow(GetBubbleArrow());
50 set_mirror_arrow_in_rtl(false); 50 set_mirror_arrow_in_rtl(false);
51 set_background(NULL); 51 set_background(nullptr);
52 set_color(kShelfDefaultBaseColor); 52 set_color(kShelfDefaultBaseColor);
53 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); 53 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
54 // Overflow bubble should not get focus. If it get focus when it is shown, 54 // Overflow bubble should not get focus. If it get focus when it is shown,
55 // active state item is changed to running state. 55 // active state item is changed to running state.
56 set_can_activate(false); 56 set_can_activate(false);
57 57
58 // Makes bubble view has a layer and clip its children layers. 58 // Makes bubble view has a layer and clip its children layers.
59 SetPaintToLayer(); 59 SetPaintToLayer();
60 layer()->SetFillsBoundsOpaquely(false); 60 layer()->SetFillsBoundsOpaquely(false);
61 layer()->SetMasksToBounds(true); 61 layer()->SetMasksToBounds(true);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 bubble_rect.Offset(0, offset); 222 bubble_rect.Offset(0, offset);
223 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 223 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
224 } 224 }
225 225
226 GetBubbleFrameView()->SchedulePaint(); 226 GetBubbleFrameView()->SchedulePaint();
227 return bubble_rect; 227 return bubble_rect;
228 } 228 }
229 229
230 } // namespace ash 230 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/overflow_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698