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

Unified Diff: content/browser/renderer_host/render_widget_host_delegate.h

Issue 2775553002: Adds the ability for WebContentsDelegate to decide if event should be updated (Closed)
Patch Set: Fix compile Created 3 years, 9 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: content/browser/renderer_host/render_widget_host_delegate.h
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index 1ef3212d4b63270d2bb636624643593f48d7dc24..46d7a6aaddd2e260802afc35767d7b891699dad4 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -40,6 +40,7 @@ class RenderWidgetHostInputEventRouter;
class RenderViewHostDelegateView;
class TextInputManager;
class WebContents;
+enum class KeyboardEventProcessingResult;
struct ScreenInfo;
struct NativeWebKeyboardEvent;
@@ -77,12 +78,10 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
virtual void GetScreenInfo(ScreenInfo* web_screen_info);
// Callback to give the browser a chance to handle the specified keyboard
- // event before sending it to the renderer.
- // Returns true if the |event| was handled. Otherwise, if the |event| would
- // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
- // |*is_keyboard_shortcut| should be set to true.
- virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut);
+ // event before sending it to the renderer. See enum for details on return
+ // value.
+ virtual KeyboardEventProcessingResult PreHandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event);
// Callback to inform the browser that the renderer did not process the
// specified events. This gives an opportunity to the browser to process the
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.cc ('k') | content/browser/renderer_host/render_widget_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698