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" |
11 #include "ash/shelf/shelf_layout_manager.h" | 11 #include "ash/shelf/shelf_layout_manager.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 "ui/events/event.h" | 15 #include "ui/events/event.h" |
16 #include "ui/gfx/insets.h" | 16 #include "ui/gfx/geometry/insets.h" |
17 #include "ui/gfx/screen.h" | 17 #include "ui/gfx/screen.h" |
18 #include "ui/views/bubble/bubble_frame_view.h" | 18 #include "ui/views/bubble/bubble_frame_view.h" |
19 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
20 | 20 |
21 namespace ash { | 21 namespace ash { |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Max bubble size to screen size ratio. | 24 // Max bubble size to screen size ratio. |
25 const float kMaxBubbleSizeToScreenRatio = 0.5f; | 25 const float kMaxBubbleSizeToScreenRatio = 0.5f; |
26 | 26 |
(...skipping 187 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 |