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

Unified Diff: chrome/browser/ui/app_list/extension_app_item.cc

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed flag usage again Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/extension_app_item.cc
diff --git a/chrome/browser/ui/app_list/extension_app_item.cc b/chrome/browser/ui/app_list/extension_app_item.cc
index 4cd4ff4a4b9dfd36e0ee0c6c10c241a7ec10a741..a8b0856d277e90a76bc049d8473ed329f371c7ae 100644
--- a/chrome/browser/ui/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/app_list/extension_app_item.cc
@@ -37,6 +37,10 @@
#include "ui/gfx/image/canvas_image_source.h"
#include "ui/gfx/image/image_skia_operations.h"
+#if defined(USE_ASH)
+#include "ash/shell.h"
+#endif
+
using extensions::Extension;
namespace {
@@ -559,15 +563,19 @@ ui::MenuModel* ExtensionAppItem::GetContextMenuModel() {
context_menu_model_->AddCheckItemWithStringId(
LAUNCH_TYPE_PINNED_TAB,
IDS_APP_CONTEXT_MENU_OPEN_PINNED);
- context_menu_model_->AddCheckItemWithStringId(
- LAUNCH_TYPE_WINDOW,
- IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
- // Even though the launch type is Full Screen it is more accurately
- // described as Maximized in Ash.
- context_menu_model_->AddCheckItemWithStringId(
- LAUNCH_TYPE_FULLSCREEN,
- IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED);
-
+#if defined(USE_ASH)
+ if (!ash::Shell::IsForcedMaximizeMode())
+#endif
+ {
+ context_menu_model_->AddCheckItemWithStringId(
+ LAUNCH_TYPE_WINDOW,
+ IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
+ // Even though the launch type is Full Screen it is more accurately
+ // described as Maximized in Ash.
+ context_menu_model_->AddCheckItemWithStringId(
+ LAUNCH_TYPE_FULLSCREEN,
+ IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED);
+ }
context_menu_model_->AddSeparator(ui::NORMAL_SEPARATOR);
context_menu_model_->AddItemWithStringId(OPTIONS,
IDS_NEW_TAB_APP_OPTIONS);

Powered by Google App Engine
This is Rietveld 408576698