OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/shelf/app_list_button.h" | 5 #include "ash/common/shelf/app_list_button.h" |
6 | 6 |
7 #include "ash/common/ash_constants.h" | 7 #include "ash/common/ash_constants.h" |
8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
9 #include "ash/common/shelf/ink_drop_button_listener.h" | 9 #include "ash/common/shelf/ink_drop_button_listener.h" |
10 #include "ash/common/shelf/shelf_constants.h" | 10 #include "ash/common/shelf/shelf_constants.h" |
11 #include "ash/common/shelf/shelf_item_types.h" | 11 #include "ash/common/shelf/shelf_item_types.h" |
12 #include "ash/common/shelf/shelf_view.h" | 12 #include "ash/common/shelf/shelf_view.h" |
13 #include "ash/common/shelf/wm_shelf.h" | 13 #include "ash/common/shelf/wm_shelf.h" |
14 #include "ash/common/shelf/wm_shelf_util.h" | 14 #include "ash/common/shelf/wm_shelf_util.h" |
15 #include "ash/common/system/tray/tray_popup_utils.h" | 15 #include "ash/common/system/tray/tray_popup_utils.h" |
16 #include "ash/common/wm_shell.h" | 16 #include "ash/common/wm_shell.h" |
17 #include "ash/public/cpp/shelf_types.h" | 17 #include "ash/public/cpp/shelf_types.h" |
18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/memory/ptr_util.h" |
19 #include "grit/ash_resources.h" | 20 #include "grit/ash_resources.h" |
20 #include "grit/ash_strings.h" | 21 #include "grit/ash_strings.h" |
21 #include "ui/accessibility/ax_node_data.h" | 22 #include "ui/accessibility/ax_node_data.h" |
22 #include "ui/app_list/app_list_switches.h" | 23 #include "ui/app_list/app_list_switches.h" |
23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/gfx/canvas.h" | 26 #include "ui/gfx/canvas.h" |
26 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" | 27 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" |
27 #include "ui/views/animation/ink_drop_impl.h" | 28 #include "ui/views/animation/ink_drop_impl.h" |
28 #include "ui/views/animation/ink_drop_mask.h" | 29 #include "ui/views/animation/ink_drop_mask.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 int center = std::max(width(), height()) / 2.f; | 294 int center = std::max(width(), height()) / 2.f; |
294 gfx::Point centroid(center, center); | 295 gfx::Point centroid(center, center); |
295 // For the left shelf alignment, we need to right-justify. For other shelf | 296 // For the left shelf alignment, we need to right-justify. For other shelf |
296 // alignments, left/top justification (i.e. no adjustments are necessary). | 297 // alignments, left/top justification (i.e. no adjustments are necessary). |
297 if (SHELF_ALIGNMENT_LEFT == wm_shelf_->GetAlignment()) | 298 if (SHELF_ALIGNMENT_LEFT == wm_shelf_->GetAlignment()) |
298 centroid.set_x(width() - center); | 299 centroid.set_x(width() - center); |
299 return centroid; | 300 return centroid; |
300 } | 301 } |
301 | 302 |
302 } // namespace ash | 303 } // namespace ash |
OLD | NEW |