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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(const WebKeyboardEvent& event) { |
1209 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1209 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
1210 if (view) { | 1210 if (view) { |
1211 // TODO(brettw) why do we have to filter these types of events here. Can't | 1211 // 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 | 1212 // 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? | 1213 // should be able to decide which ones it wants or not? |
1214 if ((event.type == WebInputEvent::KEY_DOWN) || | 1214 if ((event.type == WebInputEvent::RAW_KEY_DOWN) || |
| 1215 (event.type == WebInputEvent::KEY_DOWN) || |
1215 (event.type == WebInputEvent::CHAR)) { | 1216 (event.type == WebInputEvent::CHAR)) { |
1216 view->HandleKeyboardEvent(event); | 1217 view->HandleKeyboardEvent(event); |
1217 } | 1218 } |
1218 } | 1219 } |
1219 } | 1220 } |
1220 | 1221 |
1221 void RenderViewHost::OnEnterOrSpace() { | 1222 void RenderViewHost::OnEnterOrSpace() { |
1222 delegate_->OnEnterOrSpace(); | 1223 delegate_->OnEnterOrSpace(); |
1223 } | 1224 } |
1224 | 1225 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 void RenderViewHost::RaisePersonalizationEvent(std::string event_name, | 1330 void RenderViewHost::RaisePersonalizationEvent(std::string event_name, |
1330 std::string event_arg) { | 1331 std::string event_arg) { |
1331 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); | 1332 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); |
1332 } | 1333 } |
1333 #endif | 1334 #endif |
1334 | 1335 |
1335 void RenderViewHost::ForwardMessageFromExternalHost( | 1336 void RenderViewHost::ForwardMessageFromExternalHost( |
1336 const std::string& message) { | 1337 const std::string& message) { |
1337 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message)); | 1338 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message)); |
1338 } | 1339 } |
OLD | NEW |