Index: chrome/browser/extensions/extension_view_host.cc |
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc |
index 5b5d9d4e47da9c99a83769f2a12b7ea617bc5afe..112f79a44f8f227400675aec993f9219a8c6d6bd 100644 |
--- a/chrome/browser/extensions/extension_view_host.cc |
+++ b/chrome/browser/extensions/extension_view_host.cc |
@@ -18,6 +18,7 @@ |
#include "components/autofill/content/browser/content_autofill_driver_factory.h" |
#include "components/autofill/core/browser/autofill_manager.h" |
#include "components/web_modal/web_contents_modal_dialog_manager.h" |
+#include "content/public/browser/keyboard_event_processing_result.h" |
#include "content/public/browser/notification_source.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/render_widget_host.h" |
@@ -173,25 +174,21 @@ bool ExtensionViewHost::ShouldTransferNavigation( |
return !is_main_frame_navigation; |
} |
-bool ExtensionViewHost::PreHandleKeyboardEvent( |
- WebContents* source, |
- const NativeWebKeyboardEvent& event, |
- bool* is_keyboard_shortcut) { |
+content::KeyboardEventProcessingResult |
+ExtensionViewHost::PreHandleKeyboardEvent(WebContents* source, |
+ const NativeWebKeyboardEvent& event) { |
if (extension_host_type() == VIEW_TYPE_EXTENSION_POPUP && |
event.type() == NativeWebKeyboardEvent::RawKeyDown && |
event.windowsKeyCode == ui::VKEY_ESCAPE) { |
- DCHECK(is_keyboard_shortcut != NULL); |
- *is_keyboard_shortcut = true; |
- return false; |
+ return content::KeyboardEventProcessingResult::NOT_HANDLED_IS_SHORTCUT; |
} |
// Handle higher priority browser shortcuts such as Ctrl-w. |
Browser* browser = view_->GetBrowser(); |
if (browser) |
- return browser->PreHandleKeyboardEvent(source, event, is_keyboard_shortcut); |
+ return browser->PreHandleKeyboardEvent(source, event); |
- *is_keyboard_shortcut = false; |
- return false; |
+ return content::KeyboardEventProcessingResult::NOT_HANDLED; |
} |
void ExtensionViewHost::HandleKeyboardEvent( |