| 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 6079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6090 selection_text_ != text) { | 6090 selection_text_ != text) { |
| 6091 selection_text_ = text; | 6091 selection_text_ = text; |
| 6092 selection_text_offset_ = offset; | 6092 selection_text_offset_ = offset; |
| 6093 selection_range_ = range; | 6093 selection_range_ = range; |
| 6094 SetSelectedText(text, offset, range); | 6094 SetSelectedText(text, offset, range); |
| 6095 } | 6095 } |
| 6096 GetRenderWidget()->UpdateSelectionBounds(); | 6096 GetRenderWidget()->UpdateSelectionBounds(); |
| 6097 } | 6097 } |
| 6098 | 6098 |
| 6099 void RenderFrameImpl::InitializeUserMediaClient() { | 6099 void RenderFrameImpl::InitializeUserMediaClient() { |
| 6100 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 6100 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. |
| 6101 if (!render_thread) // Will be NULL during unit tests. | |
| 6102 return; | 6101 return; |
| 6103 | 6102 |
| 6104 #if BUILDFLAG(ENABLE_WEBRTC) | 6103 #if BUILDFLAG(ENABLE_WEBRTC) |
| 6105 DCHECK(!web_user_media_client_); | 6104 DCHECK(!web_user_media_client_); |
| 6106 web_user_media_client_ = new UserMediaClientImpl( | 6105 web_user_media_client_ = new UserMediaClientImpl( |
| 6107 this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(), | 6106 this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(), |
| 6108 base::MakeUnique<MediaStreamDispatcher>(this), | 6107 base::MakeUnique<MediaStreamDispatcher>(this)); |
| 6109 render_thread->GetWorkerTaskRunner()); | |
| 6110 GetInterfaceRegistry()->AddInterface( | 6108 GetInterfaceRegistry()->AddInterface( |
| 6111 base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID())); | 6109 base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID())); |
| 6112 #endif | 6110 #endif |
| 6113 } | 6111 } |
| 6114 | 6112 |
| 6115 WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream( | 6113 WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream( |
| 6116 WebMediaPlayerClient* client, | 6114 WebMediaPlayerClient* client, |
| 6117 const WebString& sink_id, | 6115 const WebString& sink_id, |
| 6118 const WebSecurityOrigin& security_origin) { | 6116 const WebSecurityOrigin& security_origin) { |
| 6119 #if BUILDFLAG(ENABLE_WEBRTC) | 6117 #if BUILDFLAG(ENABLE_WEBRTC) |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6816 // event target. Potentially a Pepper plugin will receive the event. | 6814 // event target. Potentially a Pepper plugin will receive the event. |
| 6817 // In order to tell whether a plugin gets the last mouse event and which it | 6815 // In order to tell whether a plugin gets the last mouse event and which it |
| 6818 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6816 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6819 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6817 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6820 // |pepper_last_mouse_event_target_|. | 6818 // |pepper_last_mouse_event_target_|. |
| 6821 pepper_last_mouse_event_target_ = nullptr; | 6819 pepper_last_mouse_event_target_ = nullptr; |
| 6822 #endif | 6820 #endif |
| 6823 } | 6821 } |
| 6824 | 6822 |
| 6825 } // namespace content | 6823 } // namespace content |
| OLD | NEW |