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

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

Issue 97983003: Start the move of launcher_types.h to shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: the rename Created 7 years 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/shelf_constants.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/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_constants.h"
10 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
11 #include "ash/shelf/shelf_view.h" 12 #include "ash/shelf/shelf_view.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "ash/shell_window_ids.h" 14 #include "ash/shell_window_ids.h"
14 #include "ui/events/event.h" 15 #include "ui/events/event.h"
15 #include "ui/gfx/insets.h" 16 #include "ui/gfx/insets.h"
16 #include "ui/gfx/screen.h" 17 #include "ui/gfx/screen.h"
17 #include "ui/views/bubble/bubble_frame_view.h" 18 #include "ui/views/bubble/bubble_frame_view.h"
18 #include "ui/views/widget/widget.h" 19 #include "ui/views/widget/widget.h"
19 20
(...skipping 20 matching lines...) Expand all
40 OverflowBubbleView::~OverflowBubbleView() { 41 OverflowBubbleView::~OverflowBubbleView() {
41 } 42 }
42 43
43 void OverflowBubbleView::InitOverflowBubble(views::View* anchor, 44 void OverflowBubbleView::InitOverflowBubble(views::View* anchor,
44 ShelfView* shelf_view) { 45 ShelfView* shelf_view) {
45 // set_anchor_view needs to be called before GetShelfLayoutManager() can be 46 // set_anchor_view needs to be called before GetShelfLayoutManager() can be
46 // called. 47 // called.
47 SetAnchorView(anchor); 48 SetAnchorView(anchor);
48 set_arrow(GetBubbleArrow()); 49 set_arrow(GetBubbleArrow());
49 set_background(NULL); 50 set_background(NULL);
50 set_color(SkColorSetARGB(kLauncherBackgroundAlpha, 0, 0, 0)); 51 set_color(SkColorSetARGB(kShelfBackgroundAlpha, 0, 0, 0));
51 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); 52 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding));
52 set_move_with_anchor(true); 53 set_move_with_anchor(true);
53 // 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,
54 // active state item is changed to running state. 55 // active state item is changed to running state.
55 set_use_focusless(true); 56 set_use_focusless(true);
56 57
57 // Makes bubble view has a layer and clip its children layers. 58 // Makes bubble view has a layer and clip its children layers.
58 SetPaintToLayer(true); 59 SetPaintToLayer(true);
59 SetFillsBoundsOpaquely(false); 60 SetFillsBoundsOpaquely(false);
60 layer()->SetMasksToBounds(true); 61 layer()->SetMasksToBounds(true);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 bubble_rect.Offset(0, offset); 218 bubble_rect.Offset(0, offset);
218 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); 219 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y());
219 } 220 }
220 221
221 GetBubbleFrameView()->SchedulePaint(); 222 GetBubbleFrameView()->SchedulePaint();
222 return bubble_rect; 223 return bubble_rect;
223 } 224 }
224 225
225 } // namespace internal 226 } // namespace internal
226 } // namespace ash 227 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/app_list_button.cc ('k') | ash/shelf/shelf_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698