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

Unified Diff: chrome/browser/ui/views/apps/native_app_window_views.cc

Issue 140123009: kiosk: Disable Ctrl+W and Ctrl+Shift+Q shortcut. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/accelerators/accelerator_table.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/views/apps/native_app_window_views.cc
diff --git a/chrome/browser/ui/views/apps/native_app_window_views.cc b/chrome/browser/ui/views/apps/native_app_window_views.cc
index aacb7cd7b22960a5c31c99283ca088746f42a18a..3f3f11adc149842bb44eed070fa142c812cef95a 100644
--- a/chrome/browser/ui/views/apps/native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/native_app_window_views.cc
@@ -11,6 +11,7 @@
#include "base/path_service.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
@@ -301,9 +302,13 @@ void NativeAppWindowViews::InitializeDefaultWindow(
views::FocusManager* focus_manager = GetFocusManager();
const std::map<ui::Accelerator, int>& accelerator_table =
GetAcceleratorTable();
+ const bool is_kiosk_app_mode = chrome::IsRunningInForcedAppMode();
for (std::map<ui::Accelerator, int>::const_iterator iter =
accelerator_table.begin();
iter != accelerator_table.end(); ++iter) {
+ if (is_kiosk_app_mode && !chrome::IsCommandAllowedInAppMode(iter->second))
+ continue;
+
focus_manager->RegisterAccelerator(
iter->first, ui::AcceleratorManager::kNormalPriority, this);
}
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698