OLD | NEW |
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_constants.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 ShelfView* shelf_view) { | 43 ShelfView* shelf_view) { |
44 // set_anchor_view needs to be called before GetShelfLayoutManager() can be | 44 // set_anchor_view needs to be called before GetShelfLayoutManager() can be |
45 // called. | 45 // called. |
46 SetAnchorView(anchor); | 46 SetAnchorView(anchor); |
47 set_arrow(GetBubbleArrow()); | 47 set_arrow(GetBubbleArrow()); |
48 set_background(NULL); | 48 set_background(NULL); |
49 set_color(SkColorSetARGB(kShelfBackgroundAlpha, 0, 0, 0)); | 49 set_color(SkColorSetARGB(kShelfBackgroundAlpha, 0, 0, 0)); |
50 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); | 50 set_margins(gfx::Insets(kPadding, kPadding, kPadding, kPadding)); |
51 // Overflow bubble should not get focus. If it get focus when it is shown, | 51 // Overflow bubble should not get focus. If it get focus when it is shown, |
52 // active state item is changed to running state. | 52 // active state item is changed to running state. |
53 set_use_focusless(true); | 53 set_can_activate(false); |
54 | 54 |
55 // Makes bubble view has a layer and clip its children layers. | 55 // Makes bubble view has a layer and clip its children layers. |
56 SetPaintToLayer(true); | 56 SetPaintToLayer(true); |
57 SetFillsBoundsOpaquely(false); | 57 SetFillsBoundsOpaquely(false); |
58 layer()->SetMasksToBounds(true); | 58 layer()->SetMasksToBounds(true); |
59 | 59 |
60 shelf_view_ = shelf_view; | 60 shelf_view_ = shelf_view; |
61 AddChildView(shelf_view_); | 61 AddChildView(shelf_view_); |
62 | 62 |
63 set_parent_window(Shell::GetContainer( | 63 set_parent_window(Shell::GetContainer( |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 bubble_rect.Offset(0, offset); | 215 bubble_rect.Offset(0, offset); |
216 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); | 216 border->set_arrow_offset(anchor_rect.CenterPoint().y() - bubble_rect.y()); |
217 } | 217 } |
218 | 218 |
219 GetBubbleFrameView()->SchedulePaint(); | 219 GetBubbleFrameView()->SchedulePaint(); |
220 return bubble_rect; | 220 return bubble_rect; |
221 } | 221 } |
222 | 222 |
223 } // namespace ash | 223 } // namespace ash |
OLD | NEW |