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

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

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: comment Created 4 years, 8 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.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.h" 10 #include "ash/shelf/shelf.h"
11 #include "ash/shelf/shelf_constants.h" 11 #include "ash/shelf/shelf_constants.h"
12 #include "ash/shelf/shelf_view.h" 12 #include "ash/shelf/shelf_view.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/shell_window_ids.h" 14 #include "ash/shell_window_ids.h"
15 #include "ash/wm/common/shelf/wm_shelf_constants.h"
15 #include "ui/events/event.h" 16 #include "ui/events/event.h"
16 #include "ui/gfx/geometry/insets.h" 17 #include "ui/gfx/geometry/insets.h"
17 #include "ui/gfx/screen.h" 18 #include "ui/gfx/screen.h"
18 #include "ui/views/bubble/bubble_frame_view.h" 19 #include "ui/views/bubble/bubble_frame_view.h"
19 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
20 21
21 namespace ash { 22 namespace ash {
22 namespace { 23 namespace {
23 24
24 // Max bubble size to screen size ratio. 25 // Max bubble size to screen size ratio.
(...skipping 11 matching lines...) Expand all
36 37
37 OverflowBubbleView::~OverflowBubbleView() {} 38 OverflowBubbleView::~OverflowBubbleView() {}
38 39
39 void OverflowBubbleView::InitOverflowBubble(views::View* anchor, 40 void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
40 ShelfView* shelf_view) { 41 ShelfView* shelf_view) {
41 shelf_view_ = shelf_view; 42 shelf_view_ = shelf_view;
42 43
43 SetAnchorView(anchor); 44 SetAnchorView(anchor);
44 set_arrow(GetBubbleArrow()); 45 set_arrow(GetBubbleArrow());
45 set_background(NULL); 46 set_background(NULL);
46 set_color(SkColorSetARGB(kShelfBackgroundAlpha, 0, 0, 0)); 47 set_color(SkColorSetARGB(wm::kShelfBackgroundAlpha, 0, 0, 0));
47 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); 48 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
48 // Overflow bubble should not get focus. If it get focus when it is shown, 49 // Overflow bubble should not get focus. If it get focus when it is shown,
49 // active state item is changed to running state. 50 // active state item is changed to running state.
50 set_can_activate(false); 51 set_can_activate(false);
51 52
52 // Makes bubble view has a layer and clip its children layers. 53 // Makes bubble view has a layer and clip its children layers.
53 SetPaintToLayer(true); 54 SetPaintToLayer(true);
54 layer()->SetFillsBoundsOpaquely(false); 55 layer()->SetFillsBoundsOpaquely(false);
55 layer()->SetMasksToBounds(true); 56 layer()->SetMasksToBounds(true);
56 57
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 207
207 bubble_rect.Offset(0, offset); 208 bubble_rect.Offset(0, offset);
208 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 209 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
209 } 210 }
210 211
211 GetBubbleFrameView()->SchedulePaint(); 212 GetBubbleFrameView()->SchedulePaint();
212 return bubble_rect; 213 return bubble_rect;
213 } 214 }
214 215
215 } // namespace ash 216 } // 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