| 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 6112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6123 selection_text_ != text) { | 6123 selection_text_ != text) { |
| 6124 selection_text_ = text; | 6124 selection_text_ = text; |
| 6125 selection_text_offset_ = offset; | 6125 selection_text_offset_ = offset; |
| 6126 selection_range_ = range; | 6126 selection_range_ = range; |
| 6127 SetSelectedText(text, offset, range); | 6127 SetSelectedText(text, offset, range); |
| 6128 } | 6128 } |
| 6129 GetRenderWidget()->UpdateSelectionBounds(); | 6129 GetRenderWidget()->UpdateSelectionBounds(); |
| 6130 } | 6130 } |
| 6131 | 6131 |
| 6132 void RenderFrameImpl::InitializeUserMediaClient() { | 6132 void RenderFrameImpl::InitializeUserMediaClient() { |
| 6133 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. | 6133 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 6134 if (!render_thread) // Will be NULL during unit tests. |
| 6134 return; | 6135 return; |
| 6135 | 6136 |
| 6136 #if BUILDFLAG(ENABLE_WEBRTC) | 6137 #if BUILDFLAG(ENABLE_WEBRTC) |
| 6137 DCHECK(!web_user_media_client_); | 6138 DCHECK(!web_user_media_client_); |
| 6138 web_user_media_client_ = new UserMediaClientImpl( | 6139 web_user_media_client_ = new UserMediaClientImpl( |
| 6139 this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(), | 6140 this, RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(), |
| 6140 base::MakeUnique<MediaStreamDispatcher>(this)); | 6141 base::MakeUnique<MediaStreamDispatcher>(this), |
| 6142 render_thread->GetWorkerTaskRunner()); |
| 6141 GetInterfaceRegistry()->AddInterface( | 6143 GetInterfaceRegistry()->AddInterface( |
| 6142 base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID())); | 6144 base::Bind(&MediaDevicesListenerImpl::Create, GetRoutingID())); |
| 6143 #endif | 6145 #endif |
| 6144 } | 6146 } |
| 6145 | 6147 |
| 6146 WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream( | 6148 WebMediaPlayer* RenderFrameImpl::CreateWebMediaPlayerForMediaStream( |
| 6147 WebMediaPlayerClient* client, | 6149 WebMediaPlayerClient* client, |
| 6148 const WebString& sink_id, | 6150 const WebString& sink_id, |
| 6149 const WebSecurityOrigin& security_origin) { | 6151 const WebSecurityOrigin& security_origin) { |
| 6150 #if BUILDFLAG(ENABLE_WEBRTC) | 6152 #if BUILDFLAG(ENABLE_WEBRTC) |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6830 // event target. Potentially a Pepper plugin will receive the event. | 6832 // event target. Potentially a Pepper plugin will receive the event. |
| 6831 // In order to tell whether a plugin gets the last mouse event and which it | 6833 // In order to tell whether a plugin gets the last mouse event and which it |
| 6832 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6834 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6833 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6835 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6834 // |pepper_last_mouse_event_target_|. | 6836 // |pepper_last_mouse_event_target_|. |
| 6835 pepper_last_mouse_event_target_ = nullptr; | 6837 pepper_last_mouse_event_target_ = nullptr; |
| 6836 #endif | 6838 #endif |
| 6837 } | 6839 } |
| 6838 | 6840 |
| 6839 } // namespace content | 6841 } // namespace content |
| OLD | NEW |