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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 1091173005: Removed the context menu in kiosk mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add the FALL THROUGH comment Created 5 years, 5 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 | « chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 1bc7bb4928655fc43da8012a441c600fc4cc1f71..545576273f8e802122d7cf2709267574cd4b36b8 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -10,6 +10,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/command_line.h"
#include "base/i18n/rtl.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
@@ -38,6 +39,7 @@
#include "chrome/browser/ui/webui/extensions/extension_basic_info.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_metrics.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
@@ -116,6 +118,12 @@ void AppLauncherHandler::CreateAppInfo(
// Please update it whenever you add or remove any keys here.
value->Clear();
+ // Communicate the kiosk flag so the apps page can disable showing the
+ // context menu in kiosk mode.
+ value->SetBoolean(
+ "kioskMode",
+ base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode));
+
// The Extension class 'helpfully' wraps bidi control characters that
// impede our ability to determine directionality.
base::string16 short_name = base::UTF8ToUTF16(extension->short_name());
« no previous file with comments | « chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698