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

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

Issue 2680113002: [ash-md] Remove non-md code from the Shelf background animations. (Closed)
Patch Set: Merge branch 'master' into colorize_shelf_1_remove_non_md_code Created 3 years, 10 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/shelf_background_animator.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/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/shelf/shelf_constants.h" 10 #include "ash/common/shelf/shelf_constants.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void OverflowBubbleView::InitOverflowBubble(views::View* anchor, 45 void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
46 views::View* shelf_view) { 46 views::View* shelf_view) {
47 shelf_view_ = shelf_view; 47 shelf_view_ = shelf_view;
48 48
49 SetAnchorView(anchor); 49 SetAnchorView(anchor);
50 set_arrow(GetBubbleArrow()); 50 set_arrow(GetBubbleArrow());
51 set_mirror_arrow_in_rtl(false); 51 set_mirror_arrow_in_rtl(false);
52 set_background(NULL); 52 set_background(NULL);
53 SkColor color = MaterialDesignController::IsShelfMaterial() 53 SkColor color = MaterialDesignController::IsShelfMaterial()
54 ? kShelfBaseColor 54 ? kShelfBaseColor
55 : SkColorSetA(kShelfBaseColor, 55 : SkColorSetA(kShelfBaseColor, kShelfTranslucentAlpha);
56 GetShelfConstant(SHELF_BACKGROUND_ALPHA));
57 set_color(color); 56 set_color(color);
58 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); 57 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
59 // Overflow bubble should not get focus. If it get focus when it is shown, 58 // Overflow bubble should not get focus. If it get focus when it is shown,
60 // active state item is changed to running state. 59 // active state item is changed to running state.
61 set_can_activate(false); 60 set_can_activate(false);
62 61
63 // Makes bubble view has a layer and clip its children layers. 62 // Makes bubble view has a layer and clip its children layers.
64 SetPaintToLayer(); 63 SetPaintToLayer();
65 layer()->SetFillsBoundsOpaquely(false); 64 layer()->SetFillsBoundsOpaquely(false);
66 layer()->SetMasksToBounds(true); 65 layer()->SetMasksToBounds(true);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 225
227 bubble_rect.Offset(0, offset); 226 bubble_rect.Offset(0, offset);
228 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 227 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
229 } 228 }
230 229
231 GetBubbleFrameView()->SchedulePaint(); 230 GetBubbleFrameView()->SchedulePaint();
232 return bubble_rect; 231 return bubble_rect;
233 } 232 }
234 233
235 } // namespace ash 234 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/shelf_background_animator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698