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

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: 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..6e43d692bda91cf48dfea9b6ebcf22a6dee055f6 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/bookmarks/bookmark_stats.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/extensions/extension_keybinding_registry.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/infobars/infobar_service.h"
@@ -1375,10 +1376,7 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
return false;
}
- views::FocusManager* focus_manager = GetFocusManager();
- DCHECK(focus_manager);
-
- if (focus_manager->shortcut_handling_suspended())
+ if (extensions::ExtensionKeybindingRegistry::IsShortcutHandlingSuspended())
sky 2015/01/08 23:39:25 Could this be implemented by as a PreTargetHandler
Andre 2015/01/10 00:48:11 Thanks for the idea! PTAL at patch #5, using Event
return false;
ui::Accelerator accelerator =
@@ -1414,6 +1412,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