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

Unified Diff: chrome/browser/extensions/api/tab_capture/offscreen_tab.cc

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: chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
diff --git a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
index 3adbdf05b922d64d0ffc0644d6e1c09a5884a0f0..22ab6336f338d9488479620c4e0561a7ee8f76fa 100644
--- a/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ b/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/web_contents_sizer.h"
+#include "content/public/browser/keyboard_event_processing_result.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
@@ -194,15 +195,13 @@ bool OffscreenTab::HandleContextMenu(const content::ContextMenuParams& params) {
return true;
}
-bool OffscreenTab::PreHandleKeyboardEvent(
+content::KeyboardEventProcessingResult OffscreenTab::PreHandleKeyboardEvent(
WebContents* source,
- const content::NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) {
+ const content::NativeWebKeyboardEvent& event) {
DCHECK_EQ(offscreen_tab_web_contents_.get(), source);
// Intercept and silence all keyboard events before they can be sent to the
// renderer.
- *is_keyboard_shortcut = false;
- return true;
+ return content::KeyboardEventProcessingResult::HANDLED;
}
bool OffscreenTab::PreHandleGestureEvent(WebContents* source,
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/offscreen_tab.h ('k') | chrome/browser/extensions/extension_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698