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 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4335 const WebURL& url) { | 4335 const WebURL& url) { |
4336 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); | 4336 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); |
4337 Send(new FrameHostMsg_UnregisterProtocolHandler( | 4337 Send(new FrameHostMsg_UnregisterProtocolHandler( |
4338 routing_id_, | 4338 routing_id_, |
4339 base::UTF16ToUTF8(base::StringPiece16(scheme)), | 4339 base::UTF16ToUTF8(base::StringPiece16(scheme)), |
4340 url, | 4340 url, |
4341 user_gesture)); | 4341 user_gesture)); |
4342 } | 4342 } |
4343 | 4343 |
4344 blink::WebBluetooth* RenderFrameImpl::bluetooth() { | 4344 blink::WebBluetooth* RenderFrameImpl::bluetooth() { |
4345 // ChildThreadImpl::current() is null in some tests. | 4345 if (!bluetooth_.get()) { |
4346 if (!bluetooth_ && ChildThreadImpl::current()) { | 4346 bluetooth_.reset(new WebBluetoothImpl(GetServiceRegistry())); |
4347 bluetooth_.reset(new WebBluetoothImpl( | |
4348 GetServiceRegistry(), ChildThreadImpl::current()->thread_safe_sender(), | |
4349 routing_id_)); | |
4350 } | 4347 } |
4351 | |
4352 return bluetooth_.get(); | 4348 return bluetooth_.get(); |
4353 } | 4349 } |
4354 | 4350 |
4355 void RenderFrameImpl::didSerializeDataForFrame( | 4351 void RenderFrameImpl::didSerializeDataForFrame( |
4356 const WebCString& data, | 4352 const WebCString& data, |
4357 WebFrameSerializerClient::FrameSerializationStatus status) { | 4353 WebFrameSerializerClient::FrameSerializationStatus status) { |
4358 bool end_of_data = status == WebFrameSerializerClient::CurrentFrameIsFinished; | 4354 bool end_of_data = status == WebFrameSerializerClient::CurrentFrameIsFinished; |
4359 Send(new FrameHostMsg_SerializedHtmlWithLocalLinksResponse( | 4355 Send(new FrameHostMsg_SerializedHtmlWithLocalLinksResponse( |
4360 routing_id_, data, end_of_data)); | 4356 routing_id_, data, end_of_data)); |
4361 } | 4357 } |
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6157 // event target. Potentially a Pepper plugin will receive the event. | 6153 // event target. Potentially a Pepper plugin will receive the event. |
6158 // In order to tell whether a plugin gets the last mouse event and which it | 6154 // In order to tell whether a plugin gets the last mouse event and which it |
6159 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6155 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6160 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6156 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6161 // |pepper_last_mouse_event_target_|. | 6157 // |pepper_last_mouse_event_target_|. |
6162 pepper_last_mouse_event_target_ = nullptr; | 6158 pepper_last_mouse_event_target_ = nullptr; |
6163 #endif | 6159 #endif |
6164 } | 6160 } |
6165 | 6161 |
6166 } // namespace content | 6162 } // namespace content |
OLD | NEW |