Commit 9e5c48d1 authored by mnaganov's avatar mnaganov Committed by Commit bot

Publicize registration of MediaUrlInterceptor

Android WebView needs to register a MediaUrlInterceptor, but should
not depend on content/browser.

BUG=465927

Review URL: https://codereview.chromium.org/1006973002

Cr-Commit-Position: refs/heads/master@{#321547}
parent d7c94e2d
# Please include benm@ and (erikwright@) on the review for any changes # Please include torne@ and (erikwright@) on the review for any changes
# to DEPS files under android_webview/ # to DEPS files under android_webview/
# Do not add any includes under chrome/ anywhere in android_webview. # Do not add any includes under chrome/ anywhere in android_webview.
...@@ -8,7 +8,6 @@ include_rules = [ ...@@ -8,7 +8,6 @@ include_rules = [
"-android_webview/lib", "-android_webview/lib",
"+components/data_reduction_proxy", "+components/data_reduction_proxy",
"+content/browser/media/android",
"+content/public/common", "+content/public/common",
"+crypto", "+crypto",
"+gpu", "+gpu",
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h" #include "cc/base/switches.h"
#include "content/browser/media/android/browser_media_player_manager.h" #include "content/public/browser/android/browser_media_player_manager.h"
#include "content/public/browser/browser_main_runner.h" #include "content/public/browser/browser_main_runner.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/content_descriptors.h" #include "content/public/common/content_descriptors.h"
...@@ -55,8 +55,7 @@ AwMainDelegate::~AwMainDelegate() { ...@@ -55,8 +55,7 @@ AwMainDelegate::~AwMainDelegate() {
bool AwMainDelegate::BasicStartupComplete(int* exit_code) { bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
content::SetContentClient(&content_client_); content::SetContentClient(&content_client_);
content::BrowserMediaPlayerManager::RegisterMediaUrlInterceptor( content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor());
new AwMediaUrlInterceptor());
BrowserViewRenderer::CalculateTileMemoryPolicy(); BrowserViewRenderer::CalculateTileMemoryPolicy();
......
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
'variables': { 'variables': {
'public_browser_sources': [ 'public_browser_sources': [
'public/browser/access_token_store.h', 'public/browser/access_token_store.h',
'public/browser/android/browser_media_player_manager.cc',
'public/browser/android/browser_media_player_manager.h',
'public/browser/android/compositor.h', 'public/browser/android/compositor.h',
'public/browser/android/compositor_client.h', 'public/browser/android/compositor_client.h',
'public/browser/android/content_protocol_handler.h', 'public/browser/android/content_protocol_handler.h',
......
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/browser/android/browser_media_player_manager.h"
#include "content/browser/media/android/browser_media_player_manager.h"
namespace content {
void RegisterMediaUrlInterceptor(
media::MediaUrlInterceptor* media_url_interceptor) {
content::BrowserMediaPlayerManager::RegisterMediaUrlInterceptor(
media_url_interceptor);
}
} // namespace content
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
#define CONTENT_PUBLIC_BROWSER_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
#include "content/common/content_export.h"
namespace media {
class MediaUrlInterceptor;
}
namespace content {
// Permits embedders to handle custom urls.
CONTENT_EXPORT void RegisterMediaUrlInterceptor(
media::MediaUrlInterceptor* media_url_interceptor);
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment