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

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

Issue 2036353002: mash: Move ash/common/wm/shelf to ash/common/shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 6 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 | « ash/shelf/app_list_button.cc ('k') | ash/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/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/common/shelf/shelf_constants.h"
9 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
10 #include "ash/common/wm/shelf/wm_shelf_constants.h"
11 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
12 #include "ash/shelf/shelf.h" 12 #include "ash/shelf/shelf.h"
13 #include "ash/shelf/shelf_constants.h"
14 #include "ash/shelf/shelf_view.h" 13 #include "ash/shelf/shelf_view.h"
15 #include "ash/shell.h" 14 #include "ash/shell.h"
16 #include "ui/display/display.h" 15 #include "ui/display/display.h"
17 #include "ui/display/screen.h" 16 #include "ui/display/screen.h"
18 #include "ui/events/event.h" 17 #include "ui/events/event.h"
19 #include "ui/gfx/geometry/insets.h" 18 #include "ui/gfx/geometry/insets.h"
20 #include "ui/views/bubble/bubble_frame_view.h" 19 #include "ui/views/bubble/bubble_frame_view.h"
21 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
22 21
23 namespace ash { 22 namespace ash {
(...skipping 15 matching lines...) Expand all
39 OverflowBubbleView::~OverflowBubbleView() {} 38 OverflowBubbleView::~OverflowBubbleView() {}
40 39
41 void OverflowBubbleView::InitOverflowBubble(views::View* anchor, 40 void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
42 ShelfView* shelf_view) { 41 ShelfView* shelf_view) {
43 shelf_view_ = shelf_view; 42 shelf_view_ = shelf_view;
44 43
45 SetAnchorView(anchor); 44 SetAnchorView(anchor);
46 set_arrow(GetBubbleArrow()); 45 set_arrow(GetBubbleArrow());
47 set_mirror_arrow_in_rtl(false); 46 set_mirror_arrow_in_rtl(false);
48 set_background(NULL); 47 set_background(NULL);
49 set_color(SkColorSetARGB(wm::kShelfBackgroundAlpha, 0, 0, 0)); 48 set_color(SkColorSetARGB(kShelfBackgroundAlpha, 0, 0, 0));
50 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); 49 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
51 // Overflow bubble should not get focus. If it get focus when it is shown, 50 // Overflow bubble should not get focus. If it get focus when it is shown,
52 // active state item is changed to running state. 51 // active state item is changed to running state.
53 set_can_activate(false); 52 set_can_activate(false);
54 53
55 // Makes bubble view has a layer and clip its children layers. 54 // Makes bubble view has a layer and clip its children layers.
56 SetPaintToLayer(true); 55 SetPaintToLayer(true);
57 layer()->SetFillsBoundsOpaquely(false); 56 layer()->SetFillsBoundsOpaquely(false);
58 layer()->SetMasksToBounds(true); 57 layer()->SetMasksToBounds(true);
59 58
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 208
210 bubble_rect.Offset(0, offset); 209 bubble_rect.Offset(0, offset);
211 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 210 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
212 } 211 }
213 212
214 GetBubbleFrameView()->SchedulePaint(); 213 GetBubbleFrameView()->SchedulePaint();
215 return bubble_rect; 214 return bubble_rect;
216 } 215 }
217 216
218 } // namespace ash 217 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/app_list_button.cc ('k') | ash/shelf/overflow_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698