| 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/render_view_host.h" | 5 #include "chrome/browser/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 if ((event.type == WebInputEvent::KEY_DOWN) || | 1127 if ((event.type == WebInputEvent::KEY_DOWN) || |
| 1128 (event.type == WebInputEvent::CHAR)) { | 1128 (event.type == WebInputEvent::CHAR)) { |
| 1129 view->HandleKeyboardEvent( | 1129 view->HandleKeyboardEvent( |
| 1130 static_cast<const WebKeyboardEvent&>(event)); | 1130 static_cast<const WebKeyboardEvent&>(event)); |
| 1131 } | 1131 } |
| 1132 } | 1132 } |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 void RenderViewHost::ForwardKeyboardEvent(const WebKeyboardEvent& key_event) { | 1135 void RenderViewHost::ForwardKeyboardEvent(const WebKeyboardEvent& key_event) { |
| 1136 if (key_event.type == WebKeyboardEvent::CHAR && | 1136 if (key_event.type == WebKeyboardEvent::CHAR && |
| 1137 (key_event.key_data == '\n' || key_event.key_data == ' ')) { | 1137 (key_event.key_code == VK_RETURN || key_event.key_code == VK_SPACE)) { |
| 1138 delegate_->OnEnterOrSpace(); | 1138 delegate_->OnEnterOrSpace(); |
| 1139 } | 1139 } |
| 1140 RenderWidgetHost::ForwardKeyboardEvent(key_event); | 1140 RenderWidgetHost::ForwardKeyboardEvent(key_event); |
| 1141 } | 1141 } |
| 1142 | 1142 |
| 1143 void RenderViewHost::OnMissingPluginStatus(int status) { | 1143 void RenderViewHost::OnMissingPluginStatus(int status) { |
| 1144 delegate_->OnMissingPluginStatus(status); | 1144 delegate_->OnMissingPluginStatus(status); |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 void RenderViewHost::UpdateBackForwardListCount() { | 1147 void RenderViewHost::UpdateBackForwardListCount() { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 Send(new ViewMsg_PersonalizationEvent(routing_id_, | 1235 Send(new ViewMsg_PersonalizationEvent(routing_id_, |
| 1236 event_name, | 1236 event_name, |
| 1237 event_arg)); | 1237 event_arg)); |
| 1238 } | 1238 } |
| 1239 #endif | 1239 #endif |
| 1240 | 1240 |
| 1241 void RenderViewHost::ForwardMessageFromExternalHost( | 1241 void RenderViewHost::ForwardMessageFromExternalHost( |
| 1242 const std::string& target, const std::string& message) { | 1242 const std::string& target, const std::string& message) { |
| 1243 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message)); | 1243 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message)); |
| 1244 } | 1244 } |
| OLD | NEW |