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

Unified Diff: ui/views/controls/webview/webview.cc

Issue 1255783002: [Mac] Factor out keyboard shortcut handling from ChromeEventProcessingWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@execute
Patch Set: Separate CommandDispatcher and CommandDispatcherDelegate. Created 5 years, 4 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: ui/views/controls/webview/webview.cc
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index c9e3105cd60f6e066da5703303b044c5562b0733..55703b6889e230f113b79a353915b4e63a14c5ac 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -18,6 +18,7 @@
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/views_delegate.h"
+#include "ui/views/widget/native_widget_private.h"
namespace views {
@@ -249,6 +250,15 @@ void WebView::RenderProcessHostDestroyed(content::RenderProcessHost* host) {
////////////////////////////////////////////////////////////////////////////////
// WebView, content::WebContentsDelegate implementation:
+void WebView::HandleKeyboardEvent(
tapted 2015/08/18 07:22:13 is this override only to support views_examples? (
jackhou1 2015/08/25 06:31:12 Done. Left it in this CL because it's a fairly sm
+ content::WebContents* source,
+ const content::NativeWebKeyboardEvent& event) {
+ if (!event.os_event)
+ return;
+
+ GetWidget()->native_widget_private()->RepostNativeEvent(event.os_event);
+}
+
bool WebView::EmbedsFullscreenWidget() const {
DCHECK(wc_owner_.get());
return embed_fullscreen_widget_mode_enabled_;

Powered by Google App Engine
This is Rietveld 408576698