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

Unified Diff: ash/launcher/launcher_alignment_menu.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_alignment_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_alignment_menu.h
diff --git a/ash/launcher/launcher_alignment_menu.h b/ash/launcher/launcher_alignment_menu.h
new file mode 100644
index 0000000000000000000000000000000000000000..0c3d23fb1ae78930aa834035b9f89f7de86e2761
--- /dev/null
+++ b/ash/launcher/launcher_alignment_menu.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_
+#define ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_
+#pragma once
+
+#include "ash/ash_export.h"
+#include "base/basictypes.h"
+#include "ui/base/models/simple_menu_model.h"
+
+namespace ash {
+
+// Submenu for choosing the alignment of the launcher.
+class ASH_EXPORT LauncherAlignmentMenu : public ui::SimpleMenuModel,
+ public ui::SimpleMenuModel::Delegate {
+ public:
+ LauncherAlignmentMenu();
+ virtual ~LauncherAlignmentMenu();
+
+ // ui::SimpleMenuModel::Delegate overrides:
+ virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
+ virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
+ virtual bool GetAcceleratorForCommandId(
+ int command_id,
+ ui::Accelerator* accelerator) OVERRIDE;
+ virtual void ExecuteCommand(int command_id) OVERRIDE;
+
+ private:
+ enum MenuItem {
+ // Offset so as not to interfere with other menus.
+ MENU_ALIGN_LEFT = 500,
+ MENU_ALIGN_RIGHT,
+ MENU_ALIGN_BOTTOM,
+ };
+
+ DISALLOW_COPY_AND_ASSIGN(LauncherAlignmentMenu);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_alignment_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698