| 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/shelf_alignment_menu.h" | 5 #include "ash/shelf/shelf_alignment_menu.h" |
| 6 | 6 |
| 7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
| 8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "grit/ash_strings.h" | 11 #include "grit/ash_strings.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/base/l10n/l10n_util.h" | |
| 14 | 13 |
| 15 namespace ash { | 14 namespace ash { |
| 16 | 15 |
| 17 ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root) | 16 ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root) |
| 18 : ui::SimpleMenuModel(NULL), | 17 : ui::SimpleMenuModel(NULL), |
| 19 root_window_(root) { | 18 root_window_(root) { |
| 20 DCHECK(root_window_); | 19 DCHECK(root_window_); |
| 21 int align_group_id = 1; | 20 int align_group_id = 1; |
| 22 set_delegate(this); | 21 set_delegate(this); |
| 23 AddRadioItemWithStringId(MENU_ALIGN_LEFT, | 22 AddRadioItemWithStringId(MENU_ALIGN_LEFT, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 case MENU_ALIGN_RIGHT: | 67 case MENU_ALIGN_RIGHT: |
| 69 Shell::GetInstance()->metrics()-> | 68 Shell::GetInstance()->metrics()-> |
| 70 RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_RIGHT); | 69 RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_RIGHT); |
| 71 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT, | 70 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT, |
| 72 root_window_); | 71 root_window_); |
| 73 break; | 72 break; |
| 74 } | 73 } |
| 75 } | 74 } |
| 76 | 75 |
| 77 } // namespace ash | 76 } // namespace ash |
| OLD | NEW |