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

Unified Diff: chrome/browser/ui/browser.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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 82363536fccd620acf535ee81d77b8b9b8e5f33f..832153b86e17201770479a2f4bfa17284c823b52 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -176,6 +176,7 @@
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/invalidate_type.h"
+#include "content/public/browser/keyboard_event_processing_result.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
@@ -1256,16 +1257,16 @@ void Browser::SetFocusToLocationBar(bool select_all) {
window_->SetFocusToLocationBar(select_all);
}
-bool Browser::PreHandleKeyboardEvent(content::WebContents* source,
- const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) {
+content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
+ content::WebContents* source,
+ const NativeWebKeyboardEvent& event) {
// Forward keyboard events to the manager for fullscreen / mouse lock. This
// may consume the event (e.g., Esc exits fullscreen mode).
// TODO(koz): Write a test for this http://crbug.com/100441.
if (exclusive_access_manager_->HandleUserKeyPress(event))
- return true;
+ return content::KeyboardEventProcessingResult::HANDLED;
- return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut);
+ return window()->PreHandleKeyboardEvent(event);
}
void Browser::HandleKeyboardEvent(content::WebContents* source,
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698