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

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

Issue 27244: Don't send WebInputEvents from the renderer to the browser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 void RenderViewHost::OnForwardToDevToolsClient(const IPC::Message& message) { 1193 void RenderViewHost::OnForwardToDevToolsClient(const IPC::Message& message) {
1194 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1194 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1195 if (view) 1195 if (view)
1196 view->ForwardMessageToDevToolsClient(message); 1196 view->ForwardMessageToDevToolsClient(message);
1197 } 1197 }
1198 1198
1199 void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) { 1199 void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) {
1200 UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); 1200 UserMetrics::RecordComputedAction(action.c_str(), process()->profile());
1201 } 1201 }
1202 1202
1203 void RenderViewHost::UnhandledInputEvent(const WebInputEvent& event) { 1203 void RenderViewHost::UnhandledKeyboardEvent(const WebKeyboardEvent& event) {
1204 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); 1204 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
1205 if (view) { 1205 if (view) {
1206 // TODO(brettw) why do we have to filter these types of events here. Can't 1206 // TODO(brettw) why do we have to filter these types of events here. Can't
1207 // the renderer just send us the ones we care abount, or maybe the view 1207 // the renderer just send us the ones we care abount, or maybe the view
1208 // should be able to decide which ones it wants or not? 1208 // should be able to decide which ones it wants or not?
1209 if ((event.type == WebInputEvent::KEY_DOWN) || 1209 if ((event.type == WebInputEvent::KEY_DOWN) ||
1210 (event.type == WebInputEvent::CHAR)) { 1210 (event.type == WebInputEvent::CHAR)) {
1211 view->HandleKeyboardEvent( 1211 view->HandleKeyboardEvent(event);
1212 static_cast<const WebKeyboardEvent&>(event));
1213 } 1212 }
1214 } 1213 }
1215 } 1214 }
1216 1215
1217 void RenderViewHost::OnEnterOrSpace() { 1216 void RenderViewHost::OnEnterOrSpace() {
1218 delegate_->OnEnterOrSpace(); 1217 delegate_->OnEnterOrSpace();
1219 } 1218 }
1220 1219
1221 void RenderViewHost::OnMissingPluginStatus(int status) { 1220 void RenderViewHost::OnMissingPluginStatus(int status) {
1222 delegate_->OnMissingPluginStatus(status); 1221 delegate_->OnMissingPluginStatus(status);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 std::string event_arg) { 1325 std::string event_arg) {
1327 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); 1326 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg));
1328 } 1327 }
1329 #endif 1328 #endif
1330 1329
1331 void RenderViewHost::ForwardMessageFromExternalHost( 1330 void RenderViewHost::ForwardMessageFromExternalHost(
1332 const std::string& target, const std::string& message) { 1331 const std::string& target, const std::string& message) {
1333 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target, 1332 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target,
1334 message)); 1333 message));
1335 } 1334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698