Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: ash/shelf/shelf_alignment_menu.cc

Issue 2036353002: mash: Move ash/common/wm/shelf to ash/common/shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/shelf/shelf_types.h"
7 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.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 13
14 namespace ash { 14 namespace ash {
15 15
16 ShelfAlignmentMenu::ShelfAlignmentMenu(Shelf* shelf) 16 ShelfAlignmentMenu::ShelfAlignmentMenu(Shelf* shelf)
17 : ui::SimpleMenuModel(nullptr), shelf_(shelf) { 17 : ui::SimpleMenuModel(nullptr), shelf_(shelf) {
18 DCHECK(shelf_); 18 DCHECK(shelf_);
19 int align_group_id = 1; 19 int align_group_id = 1;
(...skipping 25 matching lines...) Expand all
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(wm::SHELF_ALIGNMENT_LEFT); 55 shelf_->SetAlignment(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(wm::SHELF_ALIGNMENT_BOTTOM); 59 shelf_->SetAlignment(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(wm::SHELF_ALIGNMENT_RIGHT); 63 shelf_->SetAlignment(SHELF_ALIGNMENT_RIGHT);
64 break; 64 break;
65 } 65 }
66 } 66 }
67 67
68 } // namespace ash 68 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698