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

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

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: comment Created 4 years, 8 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/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
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
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