build: guard widevine related code behind flag
This commit is contained in:
parent
1ba7e36ade
commit
ba0a1cc5e9
2 changed files with 12 additions and 2 deletions
|
@ -18,7 +18,6 @@
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/strings/string_split.h"
|
#include "base/strings/string_split.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "chrome/renderer/media/chrome_key_systems.h"
|
|
||||||
#include "chrome/renderer/printing/print_web_view_helper.h"
|
#include "chrome/renderer/printing/print_web_view_helper.h"
|
||||||
#include "chrome/renderer/tts_dispatcher.h"
|
#include "chrome/renderer/tts_dispatcher.h"
|
||||||
#include "content/public/common/content_constants.h"
|
#include "content/public/common/content_constants.h"
|
||||||
|
@ -227,11 +226,17 @@ bool RendererClientBase::OverrideCreatePlugin(
|
||||||
|
|
||||||
void RendererClientBase::AddSupportedKeySystems(
|
void RendererClientBase::AddSupportedKeySystems(
|
||||||
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems) {
|
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems) {
|
||||||
|
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||||
key_systems_provider_.AddSupportedKeySystems(key_systems);
|
key_systems_provider_.AddSupportedKeySystems(key_systems);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RendererClientBase::IsKeySystemsUpdateNeeded() {
|
bool RendererClientBase::IsKeySystemsUpdateNeeded() {
|
||||||
|
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||||
return key_systems_provider_.IsKeySystemsUpdateNeeded();
|
return key_systems_provider_.IsKeySystemsUpdateNeeded();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
v8::Local<v8::Context> RendererClientBase::GetContext(
|
v8::Local<v8::Context> RendererClientBase::GetContext(
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "chrome/renderer/media/chrome_key_systems_provider.h"
|
|
||||||
#include "content/public/renderer/content_renderer_client.h"
|
#include "content/public/renderer/content_renderer_client.h"
|
||||||
#include "third_party/blink/public/web/web_local_frame.h"
|
#include "third_party/blink/public/web/web_local_frame.h"
|
||||||
|
|
||||||
|
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||||
|
#include "chrome/renderer/media/chrome_key_systems_provider.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
class PreferencesManager;
|
class PreferencesManager;
|
||||||
|
@ -54,7 +57,9 @@ class RendererClientBase : public content::ContentRendererClient {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<PreferencesManager> preferences_manager_;
|
std::unique_ptr<PreferencesManager> preferences_manager_;
|
||||||
|
#if defined(WIDEVINE_CDM_AVAILABLE)
|
||||||
ChromeKeySystemsProvider key_systems_provider_;
|
ChromeKeySystemsProvider key_systems_provider_;
|
||||||
|
#endif
|
||||||
bool isolated_world_;
|
bool isolated_world_;
|
||||||
std::string renderer_client_id_;
|
std::string renderer_client_id_;
|
||||||
// An increasing ID used for indentifying an V8 context in this process.
|
// An increasing ID used for indentifying an V8 context in this process.
|
||||||
|
|
Loading…
Reference in a new issue