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

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

Issue 307623002: MacViews: Replace NativeWidget::GetEventHandler() with RepostNativeEvent(..) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20140528-MacViews-examples_exe
Patch Set: Created 6 years, 7 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/web_dialog_view.cc
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index 8d612f42d9195e99c79826d63be56c196e4a8595..0ab0aadc1a2b0bd7b8368ef0c87258ef32126c0e 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -18,7 +18,7 @@
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/layout/fill_layout.h"
-#include "ui/views/widget/native_widget_aura.h"
+#include "ui/views/widget/native_widget.h"
#include "ui/views/widget/root_view.h"
#include "ui/views/widget/widget.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
@@ -280,14 +280,8 @@ void WebDialogView::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
if (!event.os_event)
return;
- ui::KeyEvent aura_event(event.os_event->native_event(), false);
tapted 2014/05/28 12:36:21 note that the native event is already copied in na
sadrul 2014/05/29 23:09:27 Can you confirm that event.os_event->is_char() is
tapted 2014/05/29 23:36:19 Oooh - that's a good point. I'm not sure it's true
tapted 2014/05/30 01:59:44 Also note the non-aura version on Windows would ju
- ui::EventHandler* event_handler =
- GetWidget()->native_widget()->GetEventHandler();
-
- DCHECK(event_handler);
- if (event_handler)
- event_handler->OnKeyEvent(&aura_event);
+ GetWidget()->native_widget()->RepostNativeEvent(event.os_event);
}
void WebDialogView::CloseContents(WebContents* source) {
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | ui/views/widget/native_widget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698