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

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

Issue 225973003: DevTools: Forward whitelisted unhandled shortcuts from inspected page into DevTools frontend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address pfeldman's comments Created 6 years, 8 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/devtools/devtools_window.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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index b4ef1c2bbf0e87f86d01122d49e8f88b50241170..07109d102bd9406e44d6ac95a1734ef2584eb45f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1149,7 +1149,14 @@ bool Browser::PreHandleKeyboardEvent(content::WebContents* source,
void Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
- window()->HandleKeyboardEvent(event);
+ DevToolsWindow* devtools_window =
+ DevToolsWindow::GetInstanceForInspectedWebContents(source);
+ bool handled = false;
+ if (devtools_window)
+ handled = devtools_window->ForwardKeyboardEvent(event);
+
+ if (!handled)
+ window()->HandleKeyboardEvent(event);
}
bool Browser::TabsNeedBeforeUnloadFired() {
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698