| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 if (view()) | 1119 if (view()) |
| 1120 view()->SelectionChanged(text); | 1120 view()->SelectionChanged(text); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 void RenderViewHost::OnMsgPasteFromSelectionClipboard() { | 1123 void RenderViewHost::OnMsgPasteFromSelectionClipboard() { |
| 1124 if (view()) | 1124 if (view()) |
| 1125 view()->PasteFromSelectionClipboard(); | 1125 view()->PasteFromSelectionClipboard(); |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 void RenderViewHost::OnMsgRunFileChooser(bool multiple_files, | 1128 void RenderViewHost::OnMsgRunFileChooser(bool multiple_files, |
| 1129 const std::wstring& title, | 1129 const string16& title, |
| 1130 const std::wstring& default_file, | 1130 const FilePath& default_file) { |
| 1131 const std::wstring& filter) { | 1131 delegate_->RunFileChooser(multiple_files, title, default_file); |
| 1132 std::wstring real_filter = filter; | |
| 1133 std::replace(real_filter.begin(), real_filter.end(), '|', '\0'); | |
| 1134 delegate_->RunFileChooser(multiple_files, title, default_file, real_filter); | |
| 1135 } | 1132 } |
| 1136 | 1133 |
| 1137 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1134 void RenderViewHost::OnMsgRunJavaScriptMessage( |
| 1138 const std::wstring& message, | 1135 const std::wstring& message, |
| 1139 const std::wstring& default_prompt, | 1136 const std::wstring& default_prompt, |
| 1140 const GURL& frame_url, | 1137 const GURL& frame_url, |
| 1141 const int flags, | 1138 const int flags, |
| 1142 IPC::Message* reply_msg) { | 1139 IPC::Message* reply_msg) { |
| 1143 StopHangMonitorTimeout(); | 1140 StopHangMonitorTimeout(); |
| 1144 if (modal_dialog_count_++ == 0) | 1141 if (modal_dialog_count_++ == 0) |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 int callback_id) { | 1387 int callback_id) { |
| 1391 // TODO(aa): Here is where we can check that this renderer was supposed to be | 1388 // TODO(aa): Here is where we can check that this renderer was supposed to be |
| 1392 // able to call extension APIs. | 1389 // able to call extension APIs. |
| 1393 extension_function_dispatcher_.HandleRequest(name, args, callback_id); | 1390 extension_function_dispatcher_.HandleRequest(name, args, callback_id); |
| 1394 } | 1391 } |
| 1395 | 1392 |
| 1396 void RenderViewHost::SendExtensionResponse(int callback_id, | 1393 void RenderViewHost::SendExtensionResponse(int callback_id, |
| 1397 const std::string& response) { | 1394 const std::string& response) { |
| 1398 Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response)); | 1395 Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response)); |
| 1399 } | 1396 } |
| OLD | NEW |