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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::UnhandledInputEvent(const WebInputEvent& 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::RAW_KEY_DOWN) || |
| 1210 (event.type == WebInputEvent::KEY_DOWN) || |
1210 (event.type == WebInputEvent::CHAR)) { | 1211 (event.type == WebInputEvent::CHAR)) { |
1211 view->HandleKeyboardEvent( | 1212 view->HandleKeyboardEvent( |
1212 static_cast<const WebKeyboardEvent&>(event)); | 1213 static_cast<const WebKeyboardEvent&>(event)); |
1213 } | 1214 } |
1214 } | 1215 } |
1215 } | 1216 } |
1216 | 1217 |
1217 void RenderViewHost::OnEnterOrSpace() { | 1218 void RenderViewHost::OnEnterOrSpace() { |
1218 delegate_->OnEnterOrSpace(); | 1219 delegate_->OnEnterOrSpace(); |
1219 } | 1220 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 std::string event_arg) { | 1327 std::string event_arg) { |
1327 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); | 1328 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); |
1328 } | 1329 } |
1329 #endif | 1330 #endif |
1330 | 1331 |
1331 void RenderViewHost::ForwardMessageFromExternalHost( | 1332 void RenderViewHost::ForwardMessageFromExternalHost( |
1332 const std::string& target, const std::string& message) { | 1333 const std::string& target, const std::string& message) { |
1333 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target, | 1334 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target, |
1334 message)); | 1335 message)); |
1335 } | 1336 } |
OLD | NEW |