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 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2207 WebFrame* source_frame = NULL; | 2207 WebFrame* source_frame = NULL; |
2208 if (params.source_routing_id != MSG_ROUTING_NONE) { | 2208 if (params.source_routing_id != MSG_ROUTING_NONE) { |
2209 RenderFrameProxy* source_proxy = | 2209 RenderFrameProxy* source_proxy = |
2210 RenderFrameProxy::FromRoutingID(params.source_routing_id); | 2210 RenderFrameProxy::FromRoutingID(params.source_routing_id); |
2211 if (source_proxy) | 2211 if (source_proxy) |
2212 source_frame = source_proxy->web_frame(); | 2212 source_frame = source_proxy->web_frame(); |
2213 } | 2213 } |
2214 | 2214 |
2215 // If the message contained MessagePorts, create the corresponding endpoints. | 2215 // If the message contained MessagePorts, create the corresponding endpoints. |
2216 blink::WebMessagePortChannelArray channels = | 2216 blink::WebMessagePortChannelArray channels = |
2217 WebMessagePortChannelImpl::CreatePorts( | 2217 WebMessagePortChannelImpl::CreateFromMessagePorts(params.message_ports); |
2218 params.message_ports, params.new_routing_ids, | |
2219 base::ThreadTaskRunnerHandle::Get().get()); | |
2220 | 2218 |
2221 WebSerializedScriptValue serialized_script_value; | 2219 WebSerializedScriptValue serialized_script_value; |
2222 if (params.is_data_raw_string) { | 2220 if (params.is_data_raw_string) { |
2223 v8::HandleScope handle_scope(blink::mainThreadIsolate()); | 2221 v8::HandleScope handle_scope(blink::mainThreadIsolate()); |
2224 v8::Local<v8::Context> context = frame_->mainWorldScriptContext(); | 2222 v8::Local<v8::Context> context = frame_->mainWorldScriptContext(); |
2225 v8::Context::Scope context_scope(context); | 2223 v8::Context::Scope context_scope(context); |
2226 V8ValueConverterImpl converter; | 2224 V8ValueConverterImpl converter; |
2227 converter.SetDateAllowed(true); | 2225 converter.SetDateAllowed(true); |
2228 converter.SetRegExpAllowed(true); | 2226 converter.SetRegExpAllowed(true); |
2229 std::unique_ptr<base::Value> value(new base::StringValue(params.data)); | 2227 std::unique_ptr<base::Value> value(new base::StringValue(params.data)); |
(...skipping 4636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6866 // event target. Potentially a Pepper plugin will receive the event. | 6864 // event target. Potentially a Pepper plugin will receive the event. |
6867 // In order to tell whether a plugin gets the last mouse event and which it | 6865 // In order to tell whether a plugin gets the last mouse event and which it |
6868 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6866 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6869 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6867 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6870 // |pepper_last_mouse_event_target_|. | 6868 // |pepper_last_mouse_event_target_|. |
6871 pepper_last_mouse_event_target_ = nullptr; | 6869 pepper_last_mouse_event_target_ = nullptr; |
6872 #endif | 6870 #endif |
6873 } | 6871 } |
6874 | 6872 |
6875 } // namespace content | 6873 } // namespace content |
OLD | NEW |