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

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

Issue 570473002: kiosk: Fix zoom crash regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a DCHECK Created 6 years, 3 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/apps/chrome_app_delegate.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/chrome_native_app_window_views.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
index 44b62d1a0cde178f4ecd2afd521d43dd09f044a9..cdb6aeacc6da262a1aa4f4bf65643bf1bab3675b 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
#include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views.h"
#include "chrome/browser/ui/views/frame/taskbar_decorator.h"
+#include "chrome/browser/ui/zoom/zoom_controller.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_switches.h"
#include "extensions/common/extension.h"
@@ -273,6 +274,11 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow(
arraysize(kAppWindowAcceleratorMap) +
arraysize(kAppWindowKioskAppModeAcceleratorMap));
+ // Ensure there is a ZoomController in kiosk mode, otherwise the processing
+ // of the accelerators will cause a crash.
+ DCHECK(!is_kiosk_app_mode ||
+ ZoomController::FromWebContents(web_view()->GetWebContents()));
+
for (std::map<ui::Accelerator, int>::const_iterator iter =
accelerator_table.begin();
iter != accelerator_table.end(); ++iter) {
« no previous file with comments | « chrome/browser/ui/apps/chrome_app_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698