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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 2073783003: Fixed bug where mash chrome crashes accessing ash::Shell with context menus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 6523962eeedd142ec096abaf1134ec2df9efed0b..099e8e806792a27e7c4dba811a302977c8feb5fe 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/lifetime/keep_alive_types.h"
#include "chrome/browser/lifetime/scoped_keep_alive.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/browser_window_state.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
@@ -270,6 +271,10 @@ views::ViewsDelegate::ProcessMenuAcceleratorResult
ChromeViewsDelegate::ProcessAcceleratorWhileMenuShowing(
const ui::Accelerator& accelerator) {
#if defined(USE_ASH)
+ if (chrome::IsRunningInMash()) {
Peter Kasting 2016/06/16 17:02:38 Nit: {} unnecessary
+ return views::ViewsDelegate::ProcessMenuAcceleratorResult::CLOSE_MENU;
Peter Kasting 2016/06/16 17:02:39 Why is it correct to unconditionally close the men
+ }
+
ash::AcceleratorController* accelerator_controller =
ash::Shell::GetInstance()->accelerator_controller();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698