Chromium Code Reviews| 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 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2728 if (!web_stream.isNull()) | 2728 if (!web_stream.isNull()) |
| 2729 return CreateWebMediaPlayerForMediaStream(client, sink_id, | 2729 return CreateWebMediaPlayerForMediaStream(client, sink_id, |
| 2730 frame_->getSecurityOrigin()); | 2730 frame_->getSecurityOrigin()); |
| 2731 | 2731 |
| 2732 // If |source| was not a MediaStream, it must be a URL. | 2732 // If |source| was not a MediaStream, it must be a URL. |
| 2733 // TODO(guidou): Fix this when support for other srcObject types is added. | 2733 // TODO(guidou): Fix this when support for other srcObject types is added. |
| 2734 DCHECK(source.isURL()); | 2734 DCHECK(source.isURL()); |
| 2735 blink::WebURL url = source.getAsURL(); | 2735 blink::WebURL url = source.getAsURL(); |
| 2736 | 2736 |
| 2737 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 2737 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 2738 // Render thread may not exist in tests: | |
|
Avi (use Gerrit)
2016/10/31 14:45:29
Make comments be complete sentences, ending in a .
o1ka
2016/10/31 14:58:38
Done.
| |
| 2739 if (!render_thread) | |
| 2740 return nullptr; | |
| 2738 | 2741 |
| 2739 scoped_refptr<media::SwitchableAudioRendererSink> audio_renderer_sink = | 2742 scoped_refptr<media::SwitchableAudioRendererSink> audio_renderer_sink = |
| 2740 AudioDeviceFactory::NewSwitchableAudioRendererSink( | 2743 AudioDeviceFactory::NewSwitchableAudioRendererSink( |
| 2741 AudioDeviceFactory::kSourceMediaElement, routing_id_, 0, | 2744 AudioDeviceFactory::kSourceMediaElement, routing_id_, 0, |
| 2742 sink_id.utf8(), frame_->getSecurityOrigin()); | 2745 sink_id.utf8(), frame_->getSecurityOrigin()); |
| 2743 // We need to keep a reference to the context provider (see crbug.com/610527) | 2746 // We need to keep a reference to the context provider (see crbug.com/610527) |
| 2744 // but media/ can't depend on cc/, so for now, just keep a reference in the | 2747 // but media/ can't depend on cc/, so for now, just keep a reference in the |
| 2745 // callback. | 2748 // callback. |
| 2746 // TODO(piman): replace media::Context3D to scoped_refptr<ContextProvider> in | 2749 // TODO(piman): replace media::Context3D to scoped_refptr<ContextProvider> in |
| 2747 // media/ once ContextProvider is in gpu/. | 2750 // media/ once ContextProvider is in gpu/. |
| (...skipping 3867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6615 // event target. Potentially a Pepper plugin will receive the event. | 6618 // event target. Potentially a Pepper plugin will receive the event. |
| 6616 // In order to tell whether a plugin gets the last mouse event and which it | 6619 // In order to tell whether a plugin gets the last mouse event and which it |
| 6617 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6620 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6618 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6621 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6619 // |pepper_last_mouse_event_target_|. | 6622 // |pepper_last_mouse_event_target_|. |
| 6620 pepper_last_mouse_event_target_ = nullptr; | 6623 pepper_last_mouse_event_target_ = nullptr; |
| 6621 #endif | 6624 #endif |
| 6622 } | 6625 } |
| 6623 | 6626 |
| 6624 } // namespace content | 6627 } // namespace content |
| OLD | NEW |