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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 838253004: MacViews: Fix duplicate definition of ExtensionKeyBindingRegistry::SetShortcutHandlingSuspended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DragBookmarks2
Patch Set: Observe widget to cleanup event monitor Created 5 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
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 83c7cc90690bd9e71a68adff72c43be652a0082e..a5c5a7943bd1d2531a3f87432132a62a7f553d22 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1375,12 +1375,6 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
return false;
}
- views::FocusManager* focus_manager = GetFocusManager();
- DCHECK(focus_manager);
-
- if (focus_manager->shortcut_handling_suspended())
- return false;
-
ui::Accelerator accelerator =
ui::GetAcceleratorFromNativeWebKeyboardEvent(event);
@@ -1414,6 +1408,8 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
// If the |accelerator| is a non-browser shortcut (e.g. Ash shortcut), the
// command execution cannot be blocked and true is returned. However, it is
// okay as long as is_app() is false. See comments in this function.
+ views::FocusManager* focus_manager = GetFocusManager();
+ DCHECK(focus_manager);
const bool processed = focus_manager->ProcessAccelerator(accelerator);
const int id = controller->GetLastBlockedCommand(nullptr);
controller->SetBlockCommandExecution(original_block_command_state);

Powered by Google App Engine
This is Rietveld 408576698