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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 40065: RenderWidgetHost now stores both the WebKeyboardEvent and the native (Closed)
Patch Set: Redesign Created 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gfx/native_widget_types.h" 10 #include "base/gfx/native_widget_types.h"
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 void RenderViewHost::OnForwardToDevToolsClient(const IPC::Message& message) { 1198 void RenderViewHost::OnForwardToDevToolsClient(const IPC::Message& message) {
1199 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1199 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1200 if (view) 1200 if (view)
1201 view->ForwardMessageToDevToolsClient(message); 1201 view->ForwardMessageToDevToolsClient(message);
1202 } 1202 }
1203 1203
1204 void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) { 1204 void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) {
1205 UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); 1205 UserMetrics::RecordComputedAction(action.c_str(), process()->profile());
1206 } 1206 }
1207 1207
1208 void RenderViewHost::UnhandledKeyboardEvent(const WebKeyboardEvent& event) { 1208 void RenderViewHost::UnhandledKeyboardEvent(
1209 const NativeWebKeyboardEvent& event) {
1209 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1210 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1210 if (view) { 1211 if (view) {
1211 // TODO(brettw) why do we have to filter these types of events here. Can't 1212 // TODO(brettw) why do we have to filter these types of events here. Can't
1212 // the renderer just send us the ones we care abount, or maybe the view 1213 // the renderer just send us the ones we care abount, or maybe the view
1213 // should be able to decide which ones it wants or not? 1214 // should be able to decide which ones it wants or not?
1214 if ((event.type == WebInputEvent::RAW_KEY_DOWN) || 1215 if ((event.type == WebInputEvent::RAW_KEY_DOWN) ||
1215 (event.type == WebInputEvent::KEY_DOWN) || 1216 (event.type == WebInputEvent::KEY_DOWN) ||
1216 (event.type == WebInputEvent::CHAR)) { 1217 (event.type == WebInputEvent::CHAR)) {
1217 view->HandleKeyboardEvent(event); 1218 view->HandleKeyboardEvent(event);
1218 } 1219 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 void RenderViewHost::RaisePersonalizationEvent(std::string event_name, 1331 void RenderViewHost::RaisePersonalizationEvent(std::string event_name,
1331 std::string event_arg) { 1332 std::string event_arg) {
1332 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); 1333 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg));
1333 } 1334 }
1334 #endif 1335 #endif
1335 1336
1336 void RenderViewHost::ForwardMessageFromExternalHost( 1337 void RenderViewHost::ForwardMessageFromExternalHost(
1337 const std::string& message) { 1338 const std::string& message) {
1338 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message)); 1339 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message));
1339 } 1340 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698