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

Side by Side Diff: ash/launcher/launcher_context_menu.cc

Issue 10388036: Adds the option of aligning the launcher to the left or right. There (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_context_menu.h ('k') | ash/launcher/launcher_types.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/launcher/launcher_context_menu.h" 5 #include "ash/launcher/launcher_context_menu.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/shelf_auto_hide_behavior.h"
8 #include "grit/ash_strings.h" 9 #include "grit/ash_strings.h"
9 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
10 11
11 namespace ash { 12 namespace ash {
12 13
13 LauncherContextMenu::LauncherContextMenu() : ui::SimpleMenuModel(NULL) { 14 LauncherContextMenu::LauncherContextMenu() : ui::SimpleMenuModel(NULL) {
14 set_delegate(this); 15 set_delegate(this);
15 AddCheckItemWithStringId(MENU_AUTO_HIDE, GetAutoHideResourceStringId()); 16 AddCheckItemWithStringId(MENU_AUTO_HIDE, GetAutoHideResourceStringId());
17 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
18 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION,
19 &alignment_menu_);
16 } 20 }
17 21
18 LauncherContextMenu::~LauncherContextMenu() { 22 LauncherContextMenu::~LauncherContextMenu() {
19 } 23 }
20 24
21 // static 25 // static
22 bool LauncherContextMenu::IsAutoHideMenuHideChecked() { 26 bool LauncherContextMenu::IsAutoHideMenuHideChecked() {
23 ash::Shell* shell = ash::Shell::GetInstance(); 27 ash::Shell* shell = ash::Shell::GetInstance();
24 ash::ShelfAutoHideBehavior auto_hide_behavior = 28 ash::ShelfAutoHideBehavior auto_hide_behavior =
25 shell->GetShelfAutoHideBehavior(); 29 shell->GetShelfAutoHideBehavior();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 ui::Accelerator* accelerator) { 76 ui::Accelerator* accelerator) {
73 return false; 77 return false;
74 } 78 }
75 79
76 void LauncherContextMenu::ExecuteCommand(int command_id) { 80 void LauncherContextMenu::ExecuteCommand(int command_id) {
77 switch (static_cast<MenuItem>(command_id)) { 81 switch (static_cast<MenuItem>(command_id)) {
78 case MENU_AUTO_HIDE: 82 case MENU_AUTO_HIDE:
79 ash::Shell::GetInstance()->SetShelfAutoHideBehavior( 83 ash::Shell::GetInstance()->SetShelfAutoHideBehavior(
80 GetToggledAutoHideBehavior()); 84 GetToggledAutoHideBehavior());
81 break; 85 break;
86 case MENU_ALIGNMENT_MENU:
87 break;
82 } 88 }
83 } 89 }
84 90
85 } // namespace ash 91 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_context_menu.h ('k') | ash/launcher/launcher_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698