| OLD | NEW |
| 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 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) { | 1171 void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) { |
| 1172 UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); | 1172 UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 void RenderViewHost::UnhandledInputEvent(const WebInputEvent& event) { | 1175 void RenderViewHost::UnhandledInputEvent(const WebInputEvent& event) { |
| 1176 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1176 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
| 1177 if (view) { | 1177 if (view) { |
| 1178 // TODO(brettw) why do we have to filter these types of events here. Can't | 1178 // TODO(brettw) why do we have to filter these types of events here. Can't |
| 1179 // the renderer just send us the ones we care abount, or maybe the view | 1179 // the renderer just send us the ones we care abount, or maybe the view |
| 1180 // should be able to decide which ones it wants or not? | 1180 // should be able to decide which ones it wants or not? |
| 1181 if ((event.type == WebInputEvent::KEY_DOWN) || | 1181 if ((event.type == WebInputEvent::RAW_KEY_DOWN) || |
| 1182 (event.type == WebInputEvent::KEY_DOWN) || |
| 1182 (event.type == WebInputEvent::CHAR)) { | 1183 (event.type == WebInputEvent::CHAR)) { |
| 1183 view->HandleKeyboardEvent( | 1184 view->HandleKeyboardEvent( |
| 1184 static_cast<const WebKeyboardEvent&>(event)); | 1185 static_cast<const WebKeyboardEvent&>(event)); |
| 1185 } | 1186 } |
| 1186 } | 1187 } |
| 1187 } | 1188 } |
| 1188 | 1189 |
| 1189 void RenderViewHost::OnEnterOrSpace() { | 1190 void RenderViewHost::OnEnterOrSpace() { |
| 1190 delegate_->OnEnterOrSpace(); | 1191 delegate_->OnEnterOrSpace(); |
| 1191 } | 1192 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 std::string event_arg) { | 1295 std::string event_arg) { |
| 1295 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); | 1296 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); |
| 1296 } | 1297 } |
| 1297 #endif | 1298 #endif |
| 1298 | 1299 |
| 1299 void RenderViewHost::ForwardMessageFromExternalHost( | 1300 void RenderViewHost::ForwardMessageFromExternalHost( |
| 1300 const std::string& target, const std::string& message) { | 1301 const std::string& target, const std::string& message) { |
| 1301 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target, | 1302 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target, |
| 1302 message)); | 1303 message)); |
| 1303 } | 1304 } |
| OLD | NEW |