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

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

Issue 26373009: ash:Shelf - Added UMA stats for ShelfAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/periodic_metrics_recorder.cc ('k') | ash/shelf/shelf_view.h » ('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/shelf/shelf_layout_manager.h" 7 #include "ash/shelf/shelf_layout_manager.h"
8 #include "ash/shelf/shelf_types.h" 8 #include "ash/shelf/shelf_types.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h"
10 #include "grit/ash_strings.h" 11 #include "grit/ash_strings.h"
11 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 14
14 namespace ash { 15 namespace ash {
15 16
16 ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root) 17 ShelfAlignmentMenu::ShelfAlignmentMenu(aura::Window* root)
17 : ui::SimpleMenuModel(NULL), 18 : ui::SimpleMenuModel(NULL),
18 root_window_(root) { 19 root_window_(root) {
19 DCHECK(root_window_); 20 DCHECK(root_window_);
(...skipping 27 matching lines...) Expand all
47 48
48 bool ShelfAlignmentMenu::GetAcceleratorForCommandId( 49 bool ShelfAlignmentMenu::GetAcceleratorForCommandId(
49 int command_id, 50 int command_id,
50 ui::Accelerator* accelerator) { 51 ui::Accelerator* accelerator) {
51 return false; 52 return false;
52 } 53 }
53 54
54 void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) { 55 void ShelfAlignmentMenu::ExecuteCommand(int command_id, int event_flags) {
55 switch (static_cast<MenuItem>(command_id)) { 56 switch (static_cast<MenuItem>(command_id)) {
56 case MENU_ALIGN_LEFT: 57 case MENU_ALIGN_LEFT:
58 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
59 UMA_SHELF_ALIGNMENT_SET_LEFT);
57 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, 60 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_LEFT,
58 root_window_); 61 root_window_);
59 break; 62 break;
60 case MENU_ALIGN_BOTTOM: 63 case MENU_ALIGN_BOTTOM:
64 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
65 UMA_SHELF_ALIGNMENT_SET_BOTTOM);
61 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM, 66 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_BOTTOM,
62 root_window_); 67 root_window_);
63 break; 68 break;
64 case MENU_ALIGN_RIGHT: 69 case MENU_ALIGN_RIGHT:
70 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
71 UMA_SHELF_ALIGNMENT_SET_RIGHT);
65 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT, 72 Shell::GetInstance()->SetShelfAlignment(SHELF_ALIGNMENT_RIGHT,
66 root_window_); 73 root_window_);
67 break; 74 break;
68 } 75 }
69 } 76 }
70 77
71 } // namespace ash 78 } // namespace ash
OLDNEW
« no previous file with comments | « ash/periodic_metrics_recorder.cc ('k') | ash/shelf/shelf_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698