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

Unified Diff: chrome/browser/devtools/devtools_window.h

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 comments from tsepez@ 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
Index: chrome/browser/devtools/devtools_window.h
diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h
index fd7f43010b36322a1cc0a0b435d257963057f9b4..2a3ab2efc4c46d56efe181d071fb5e4dedbaac27 100644
--- a/chrome/browser/devtools/devtools_window.h
+++ b/chrome/browser/devtools/devtools_window.h
@@ -37,6 +37,7 @@ namespace content {
class DevToolsAgentHost;
class DevToolsClientHost;
struct FileChooserParams;
+struct NativeWebKeyboardEvent;
class RenderViewHost;
class WebContents;
}
@@ -133,6 +134,9 @@ class DevToolsWindow : private content::NotificationObserver,
// closure immediately.
void SetLoadCompletedCallback(const base::Closure& closure);
+ // Forwards an unhandled keyboard event to the DevTools frontend.
+ bool ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& event);
+
// BeforeUnload interception ////////////////////////////////////////////////
// In order to preserve any edits the user may have made in devtools, the
@@ -326,6 +330,7 @@ class DevToolsWindow : private content::NotificationObserver,
virtual void SearchInPath(int request_id,
const std::string& file_system_path,
const std::string& query) OVERRIDE;
+ virtual void SetWhitelistedShortcuts(const std::string& message) OVERRIDE;
virtual void ZoomIn() OVERRIDE;
virtual void ZoomOut() OVERRIDE;
virtual void ResetZoom() OVERRIDE;
@@ -395,6 +400,7 @@ class DevToolsWindow : private content::NotificationObserver,
// from the inspected webcontents, see InterceptPageBeforeUnload for details.
bool intercepted_page_beforeunload_;
base::Closure load_completed_callback_;
+ std::vector<int> whitelisted_keys_;
scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_;
base::WeakPtrFactory<DevToolsWindow> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698