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

Unified Diff: content/public/browser/keyboard_event_processing_result.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
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/keyboard_event_processing_result.h
diff --git a/content/public/browser/keyboard_event_processing_result.h b/content/public/browser/keyboard_event_processing_result.h
new file mode 100644
index 0000000000000000000000000000000000000000..4030a527e7c00654f11ce62e7bf30c88e4fe2e64
--- /dev/null
+++ b/content/public/browser/keyboard_event_processing_result.h
@@ -0,0 +1,30 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_KEYBOARD_EVENT_PROCESSING_RESULT_H_
+#define CONTENT_PUBLIC_BROWSER_KEYBOARD_EVENT_PROCESSING_RESULT_H_
+
+namespace content {
+
+enum class KeyboardEventProcessingResult {
+ // The event was handled.
+ HANDLED,
+
+#if defined(USE_AURA)
+ // The event was handled, but don't update the underlying event. A value
+ // HANDLED results in calling ui::Event::SetHandled(), where as this does not.
+ HANDLED_DONT_UPDATE_EVENT,
+#endif
+
+ // The event was not handled and should be forwarded to the renderer.
+ NOT_HANDLED,
+
+ // The event was not handled and should be forwarded to the renderer.
+ // Additionally the KeyEvent corresponds to a shortcut (aka accelerator).
+ NOT_HANDLED_IS_SHORTCUT,
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_KEYBOARD_EVENT_PROCESSING_RESULT_H_
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698