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

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 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
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..f89786c3411d95a59891e15c87b6035a40670ab1 100644
--- a/chrome/browser/devtools/devtools_window.h
+++ b/chrome/browser/devtools/devtools_window.h
@@ -27,6 +27,7 @@
class Browser;
class BrowserWindow;
class DevToolsControllerTest;
+class DevToolsEventForwarder;
class Profile;
namespace base {
@@ -37,6 +38,7 @@ namespace content {
class DevToolsAgentHost;
class DevToolsClientHost;
struct FileChooserParams;
+struct NativeWebKeyboardEvent;
class RenderViewHost;
class WebContents;
}
@@ -68,6 +70,11 @@ class DevToolsWindow : private content::NotificationObserver,
static DevToolsWindow* GetInstanceForInspectedRenderViewHost(
content::RenderViewHost* inspected_rvh);
+ // Return the DevToolsWindow for the given WebContents if one exists,
+ // otherwise NULL.
+ static DevToolsWindow* GetInstanceForInspectedWebContents(
+ content::WebContents* inspected_web_contents);
+
// Return the DevToolsWindow for the given WebContents if one exists and is
// docked, otherwise NULL. This method will return only fully initialized
// window ready to be presented in UI.
@@ -133,6 +140,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 +336,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;
@@ -399,6 +410,9 @@ class DevToolsWindow : private content::NotificationObserver,
scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_;
base::WeakPtrFactory<DevToolsWindow> weak_factory_;
base::TimeTicks inspect_element_start_time_;
+ scoped_ptr<DevToolsEventForwarder> event_forwarder_;
+
+ friend class DevToolsEventForwarder;
DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
};
« no previous file with comments | « chrome/browser/devtools/devtools_embedder_message_dispatcher.cc ('k') | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698