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

Unified Diff: content/public/browser/web_contents_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/public/browser/web_contents_delegate.h
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6f966c7ad588604ba8abe81e6171eb2ac6184533..bb2d849e1784914e174531f5f613f716a2952a9f 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -79,6 +79,8 @@ namespace content {
struct OpenURLParams;
struct WebContentsUnresponsiveState;
+enum class KeyboardEventProcessingResult;
+
// Objects implement this interface to get notified about changes in the
// WebContents and to provide necessary functionality.
class CONTENT_EXPORT WebContentsDelegate {
@@ -259,12 +261,10 @@ class CONTENT_EXPORT WebContentsDelegate {
const PageState& page_state);
// Allows delegates to handle keyboard events before sending 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(WebContents* source,
- const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut);
+ // See enum for description of return values.
+ virtual KeyboardEventProcessingResult PreHandleKeyboardEvent(
+ WebContents* source,
+ const NativeWebKeyboardEvent& event);
// Allows delegates to handle unhandled keyboard messages coming back from
// the renderer.
« no previous file with comments | « content/public/browser/keyboard_event_processing_result.h ('k') | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698