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.h" | 8 #include "ash/shelf/shelf.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" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 int command_id, | 45 int command_id, |
46 ui::Accelerator* accelerator) { | 46 ui::Accelerator* accelerator) { |
47 return false; | 47 return false; |
48 } | 48 } |
49 | 49 |
50 void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) { | 50 void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) { |
51 Shell* shell = Shell::GetInstance(); | 51 Shell* shell = Shell::GetInstance(); |
52 switch (static_cast<MenuItem>(command_id)) { | 52 switch (static_cast<MenuItem>(command_id)) { |
53 case MENU_ALIGN_LEFT: | 53 case MENU_ALIGN_LEFT: |
54 shell->metrics()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_LEFT); | 54 shell->metrics()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_LEFT); |
55 shelf_->SetAlignment(SHELF_ALIGNMENT_LEFT); | 55 shelf_->SetAlignment(wm::SHELF_ALIGNMENT_LEFT); |
56 break; | 56 break; |
57 case MENU_ALIGN_BOTTOM: | 57 case MENU_ALIGN_BOTTOM: |
58 shell->metrics()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_BOTTOM); | 58 shell->metrics()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_BOTTOM); |
59 shelf_->SetAlignment(SHELF_ALIGNMENT_BOTTOM); | 59 shelf_->SetAlignment(wm::SHELF_ALIGNMENT_BOTTOM); |
60 break; | 60 break; |
61 case MENU_ALIGN_RIGHT: | 61 case MENU_ALIGN_RIGHT: |
62 shell->metrics()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_RIGHT); | 62 shell->metrics()->RecordUserMetricsAction(UMA_SHELF_ALIGNMENT_SET_RIGHT); |
63 shelf_->SetAlignment(SHELF_ALIGNMENT_RIGHT); | 63 shelf_->SetAlignment(wm::SHELF_ALIGNMENT_RIGHT); |
64 break; | 64 break; |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
68 } // namespace ash | 68 } // namespace ash |
OLD | NEW |