| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 WebFrame* source_frame = NULL; | 2203 WebFrame* source_frame = NULL; |
| 2204 if (params.source_routing_id != MSG_ROUTING_NONE) { | 2204 if (params.source_routing_id != MSG_ROUTING_NONE) { |
| 2205 RenderFrameProxy* source_proxy = | 2205 RenderFrameProxy* source_proxy = |
| 2206 RenderFrameProxy::FromRoutingID(params.source_routing_id); | 2206 RenderFrameProxy::FromRoutingID(params.source_routing_id); |
| 2207 if (source_proxy) | 2207 if (source_proxy) |
| 2208 source_frame = source_proxy->web_frame(); | 2208 source_frame = source_proxy->web_frame(); |
| 2209 } | 2209 } |
| 2210 | 2210 |
| 2211 // If the message contained MessagePorts, create the corresponding endpoints. | 2211 // If the message contained MessagePorts, create the corresponding endpoints. |
| 2212 blink::WebMessagePortChannelArray channels = | 2212 blink::WebMessagePortChannelArray channels = |
| 2213 WebMessagePortChannelImpl::CreatePorts( | 2213 WebMessagePortChannelImpl::CreateFromMessagePorts(params.message_ports); |
| 2214 params.message_ports, params.new_routing_ids, | |
| 2215 base::ThreadTaskRunnerHandle::Get().get()); | |
| 2216 | 2214 |
| 2217 WebSerializedScriptValue serialized_script_value; | 2215 WebSerializedScriptValue serialized_script_value; |
| 2218 if (params.is_data_raw_string) { | 2216 if (params.is_data_raw_string) { |
| 2219 v8::HandleScope handle_scope(blink::mainThreadIsolate()); | 2217 v8::HandleScope handle_scope(blink::mainThreadIsolate()); |
| 2220 v8::Local<v8::Context> context = frame_->mainWorldScriptContext(); | 2218 v8::Local<v8::Context> context = frame_->mainWorldScriptContext(); |
| 2221 v8::Context::Scope context_scope(context); | 2219 v8::Context::Scope context_scope(context); |
| 2222 V8ValueConverterImpl converter; | 2220 V8ValueConverterImpl converter; |
| 2223 converter.SetDateAllowed(true); | 2221 converter.SetDateAllowed(true); |
| 2224 converter.SetRegExpAllowed(true); | 2222 converter.SetRegExpAllowed(true); |
| 2225 std::unique_ptr<base::Value> value(new base::StringValue(params.data)); | 2223 std::unique_ptr<base::Value> value(new base::StringValue(params.data)); |
| (...skipping 4550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6776 // event target. Potentially a Pepper plugin will receive the event. | 6774 // event target. Potentially a Pepper plugin will receive the event. |
| 6777 // In order to tell whether a plugin gets the last mouse event and which it | 6775 // In order to tell whether a plugin gets the last mouse event and which it |
| 6778 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6776 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6779 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6777 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6780 // |pepper_last_mouse_event_target_|. | 6778 // |pepper_last_mouse_event_target_|. |
| 6781 pepper_last_mouse_event_target_ = nullptr; | 6779 pepper_last_mouse_event_target_ = nullptr; |
| 6782 #endif | 6780 #endif |
| 6783 } | 6781 } |
| 6784 | 6782 |
| 6785 } // namespace content | 6783 } // namespace content |
| OLD | NEW |