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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 786 bool IsHttpPost(const blink::WebURLRequest& request) { | 786 bool IsHttpPost(const blink::WebURLRequest& request) { |
| 787 return request.httpMethod().utf8() == "POST"; | 787 return request.httpMethod().utf8() == "POST"; |
| 788 } | 788 } |
| 789 | 789 |
| 790 #if defined(OS_ANDROID) | 790 #if defined(OS_ANDROID) |
| 791 // Returns true if WMPI should be used for playback, false otherwise. | 791 // Returns true if WMPI should be used for playback, false otherwise. |
| 792 // | 792 // |
| 793 // Note that HLS and MP4 detection are pre-redirect and path-based. It is | 793 // Note that HLS and MP4 detection are pre-redirect and path-based. It is |
| 794 // possible to load such a URL and find different content. | 794 // possible to load such a URL and find different content. |
| 795 bool UseWebMediaPlayerImpl(const GURL& url) { | 795 bool UseWebMediaPlayerImpl(const GURL& url) { |
| 796 // Always use WMPI for playing blob URLs since WMPA could never play them very | |
|
ncarter (slow)
2016/09/29 21:17:08
Is this hunk supposed to be part of this CL?
I do
DaleCurtis
2016/09/29 21:55:54
Yes. All MSE playbacks are blob:// but we still ha
| |
| 797 // well and no longer has support for MSE based playbacks. | |
| 798 if (url.SchemeIsBlob()) | |
| 799 return true; | |
| 800 | |
| 796 // WMPI does not support HLS. | 801 // WMPI does not support HLS. |
| 797 if (media::MediaCodecUtil::IsHLSURL(url)) | 802 if (media::MediaCodecUtil::IsHLSURL(url)) |
| 798 return false; | 803 return false; |
| 799 | 804 |
| 800 // Don't use WMPI if the container likely contains a codec we can't decode in | 805 // Don't use WMPI if the container likely contains a codec we can't decode in |
| 801 // software and platform decoders are not available. | 806 // software and platform decoders are not available. |
| 802 if (!media::HasPlatformDecoderSupport()) { | 807 if (!media::HasPlatformDecoderSupport()) { |
| 803 // Assume that "mp4" means H264. Without platform decoder support we cannot | 808 // Assume that "mp4" means H264. Without platform decoder support we cannot |
| 804 // play it with Spitzer, thus fall back to AVDA. http://crbug.com/642988. | 809 // play it with Spitzer, thus fall back to AVDA. http://crbug.com/642988. |
| 805 if (base::ToLowerASCII(url.spec()).find("mp4") != std::string::npos) | 810 if (base::ToLowerASCII(url.spec()).find("mp4") != std::string::npos) |
| (...skipping 5626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6432 // event target. Potentially a Pepper plugin will receive the event. | 6437 // event target. Potentially a Pepper plugin will receive the event. |
| 6433 // In order to tell whether a plugin gets the last mouse event and which it | 6438 // In order to tell whether a plugin gets the last mouse event and which it |
| 6434 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6439 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6435 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6440 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6436 // |pepper_last_mouse_event_target_|. | 6441 // |pepper_last_mouse_event_target_|. |
| 6437 pepper_last_mouse_event_target_ = nullptr; | 6442 pepper_last_mouse_event_target_ = nullptr; |
| 6438 #endif | 6443 #endif |
| 6439 } | 6444 } |
| 6440 | 6445 |
| 6441 } // namespace content | 6446 } // namespace content |
| OLD | NEW |