diff options
-rw-r--r-- | chrome/renderer/chrome_content_renderer_client.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/chrome_content_renderer_client.h | 1 | ||||
-rw-r--r-- | content/renderer/content_renderer_client.h | 4 | ||||
-rw-r--r-- | content/renderer/mock_content_renderer_client.cc | 5 | ||||
-rw-r--r-- | content/renderer/mock_content_renderer_client.h | 1 | ||||
-rw-r--r-- | content/renderer/renderer_glue.cc | 5 | ||||
-rw-r--r-- | content/shell/shell_content_renderer_client.cc | 4 | ||||
-rw-r--r-- | content/shell/shell_content_renderer_client.h | 1 |
8 files changed, 24 insertions, 2 deletions
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index a21c82a..c43d921 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -705,6 +705,11 @@ bool ChromeContentRendererClient::HandleSetCookieRequest( return false; } +bool ChromeContentRendererClient::IsProtocolSupportedForMedia( + const GURL& url) { + return url.SchemeIs(chrome::kExtensionScheme); +} + void ChromeContentRendererClient::SetExtensionDispatcher( ExtensionDispatcher* extension_dispatcher) { diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h index 8123831..3cb1d4e 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h @@ -85,6 +85,7 @@ class ChromeContentRendererClient : public content::ContentRendererClient { const GURL& url, const GURL& first_party_for_cookies, const std::string& value) OVERRIDE; + virtual bool IsProtocolSupportedForMedia(const GURL& url) OVERRIDE; // For testing. void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); diff --git a/content/renderer/content_renderer_client.h b/content/renderer/content_renderer_client.h index 931d65a..1079a26 100644 --- a/content/renderer/content_renderer_client.h +++ b/content/renderer/content_renderer_client.h @@ -126,6 +126,10 @@ class ContentRendererClient { const GURL& url, const GURL& first_party_for_cookies, const std::string& value) = 0; + + // True if the protocol implemented to serve |url| supports features required + // by the media engine. + virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; }; } // namespace content diff --git a/content/renderer/mock_content_renderer_client.cc b/content/renderer/mock_content_renderer_client.cc index 843561e..b8a8e6d 100644 --- a/content/renderer/mock_content_renderer_client.cc +++ b/content/renderer/mock_content_renderer_client.cc @@ -116,4 +116,9 @@ bool MockContentRendererClient::HandleSetCookieRequest( const std::string& value) { return false; } + +bool MockContentRendererClient::IsProtocolSupportedForMedia(const GURL& url) { + return false; +} + } // namespace content diff --git a/content/renderer/mock_content_renderer_client.h b/content/renderer/mock_content_renderer_client.h index 1abda3b..bf3155d 100644 --- a/content/renderer/mock_content_renderer_client.h +++ b/content/renderer/mock_content_renderer_client.h @@ -65,6 +65,7 @@ class MockContentRendererClient : public ContentRendererClient { const GURL& url, const GURL& first_party_for_cookies, const std::string& value) OVERRIDE; + virtual bool IsProtocolSupportedForMedia(const GURL& url) OVERRIDE; }; } // namespace content diff --git a/content/renderer/renderer_glue.cc b/content/renderer/renderer_glue.cc index c5f3dec..4da134b 100644 --- a/content/renderer/renderer_glue.cc +++ b/content/renderer/renderer_glue.cc @@ -23,6 +23,7 @@ #include "content/common/socket_stream_dispatcher.h" #include "content/common/url_constants.h" #include "content/common/view_messages.h" +#include "content/renderer/content_renderer_client.h" #include "content/renderer/render_thread.h" #include "googleurl/src/url_util.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" @@ -203,11 +204,11 @@ bool IsProtocolSupportedForMedia(const GURL& url) { if (url.SchemeIsFile() || url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme) || url.SchemeIs(chrome::kDataScheme) || - url.SchemeIs(chrome::kExtensionScheme) || url.SchemeIs(chrome::kFileSystemScheme) || url.SchemeIs(chrome::kBlobScheme)) return true; - return false; + return + content::GetContentClient()->renderer()->IsProtocolSupportedForMedia(url); } // static factory function diff --git a/content/shell/shell_content_renderer_client.cc b/content/shell/shell_content_renderer_client.cc index 735197a..ea94b90 100644 --- a/content/shell/shell_content_renderer_client.cc +++ b/content/shell/shell_content_renderer_client.cc @@ -116,4 +116,8 @@ bool ShellContentRendererClient::HandleSetCookieRequest( return false; } +bool ShellContentRendererClient::IsProtocolSupportedForMedia(const GURL& url) { + return false; +} + } // namespace content diff --git a/content/shell/shell_content_renderer_client.h b/content/shell/shell_content_renderer_client.h index b498106..c2cc8fe 100644 --- a/content/shell/shell_content_renderer_client.h +++ b/content/shell/shell_content_renderer_client.h @@ -62,6 +62,7 @@ class ShellContentRendererClient : public ContentRendererClient { const GURL& url, const GURL& first_party_for_cookies, const std::string& value) OVERRIDE; + virtual bool IsProtocolSupportedForMedia(const GURL& url) OVERRIDE; }; } // namespace content |