Merge remote-tracking branch 'origin/master' into renaesop_master

This commit is contained in:
Kevin Sawicki 2017-05-18 10:08:40 -07:00
commit 84a9b6a42d
336 changed files with 16704 additions and 2418 deletions

View file

@ -66,11 +66,11 @@ class ExternalClearKeyProperties : public KeySystemProperties {
return true;
case media::EmeInitDataType::CENC:
#if defined(USE_PROPRIETARY_CODECS)
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
return true;
#else
return false;
#endif // defined(USE_PROPRIETARY_CODECS)
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
case media::EmeInitDataType::UNKNOWN:
return false;
@ -80,7 +80,7 @@ class ExternalClearKeyProperties : public KeySystemProperties {
}
SupportedCodecs GetSupportedCodecs() const override {
#if defined(USE_PROPRIETARY_CODECS)
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
#else
return media::EME_CODEC_WEBM_ALL;
@ -224,21 +224,21 @@ static void AddPepperBasedWidevine(
// as those may offer a higher level of protection.
supported_codecs |= media::EME_CODEC_WEBM_OPUS;
supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
#if defined(USE_PROPRIETARY_CODECS)
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
supported_codecs |= media::EME_CODEC_MP4_AAC;
#endif // defined(USE_PROPRIETARY_CODECS)
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
for (size_t i = 0; i < codecs.size(); ++i) {
if (codecs[i] == kCdmSupportedCodecVp8)
supported_codecs |= media::EME_CODEC_WEBM_VP8;
if (codecs[i] == kCdmSupportedCodecVp9)
supported_codecs |= media::EME_CODEC_WEBM_VP9;
#if defined(USE_PROPRIETARY_CODECS)
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
if (codecs[i] == kCdmSupportedCodecAvc1)
supported_codecs |= media::EME_CODEC_MP4_AVC1;
if (codecs[i] == kCdmSupportedCodecVp9)
supported_codecs |= media::EME_CODEC_MP4_VP9;
#endif // defined(USE_PROPRIETARY_CODECS)
#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
}
using Robustness = cdm::WidevineKeySystemProperties::Robustness;

View file

@ -15,7 +15,8 @@
#include "ppapi/proxy/serialized_structs.h"
#if defined(OS_LINUX) || defined(OS_OPENBSD)
#include "content/public/common/child_process_sandbox_support_linux.h"
#include "content/public/child/child_process_sandbox_support_linux.h"
#include "content/public/common/common_sandbox_support_linux.h"
#elif defined(OS_WIN)
#include "third_party/skia/include/ports/SkFontMgr.h"
#endif

View file

@ -8,7 +8,8 @@
#include <vector>
#include "base/lazy_instance.h"
#include "base/metrics/histogram.h"
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/render_thread.h"

View file

@ -12,7 +12,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_macros.h"
#include "base/process/process_handle.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@ -32,6 +32,7 @@
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrameClient.h"
#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPlugin.h"
#include "third_party/WebKit/public/web/WebPluginDocument.h"
@ -484,12 +485,9 @@ void PrepareFrameAndViewForPrint::ResizeForPrinting() {
// Backup size and offset if it's a local frame.
blink::WebView* web_view = frame_.view();
// Backup size and offset.
if (blink::WebFrame* web_frame = web_view->mainFrame())
prev_scroll_offset_ = web_frame->scrollOffset();
if (blink::WebFrame* web_frame = web_view->mainFrame()) {
if (web_frame->isWebLocalFrame())
prev_scroll_offset_ = web_frame->scrollOffset();
prev_scroll_offset_ = web_frame->getScrollOffset();
}
prev_view_size_ = web_view->size();
@ -535,8 +533,10 @@ void PrepareFrameAndViewForPrint::CopySelection(
blink::WebView::create(this, blink::WebPageVisibilityStateVisible);
owns_web_view_ = true;
content::RenderView::ApplyWebPreferences(prefs, web_view);
web_view->setMainFrame(
blink::WebLocalFrame::create(blink::WebTreeScopeType::Document, this));
blink::WebLocalFrame* main_frame = blink::WebLocalFrame::create(
blink::WebTreeScopeType::Document, this, nullptr, nullptr);
web_view->setMainFrame(main_frame);
blink::WebFrameWidget::create(this, web_view, main_frame);
frame_.Reset(web_view->mainFrame()->toWebLocalFrame());
node_to_print_.reset();
@ -565,7 +565,8 @@ blink::WebLocalFrame* PrepareFrameAndViewForPrint::createChildFrame(
const blink::WebString& unique_name,
blink::WebSandboxFlags sandbox_flags,
const blink::WebFrameOwnerProperties& frame_owner_properties) {
blink::WebLocalFrame* frame = blink::WebLocalFrame::create(scope, this);
blink::WebLocalFrame* frame = blink::WebLocalFrame::create(
scope, this, nullptr, nullptr);
parent->appendChild(frame);
return frame;
}

View file

@ -126,12 +126,12 @@ void PrintWebViewHelper::PrintPageInternal(
&content_area);
gfx::Rect canvas_area = content_area;
SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
page_size, canvas_area, scale_factor);
cc::PaintCanvas* canvas =
metafile->GetVectorCanvasForNewPage(page_size, canvas_area, scale_factor);
if (!canvas)
return;
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
MetafileSkiaWrapper::SetMetafileOnCanvas(canvas, metafile);
RenderPageContent(frame, params.page_number, canvas_area, content_area,
scale_factor, canvas);

View file

@ -14,7 +14,6 @@
#include "printing/page_size_margins.h"
#include "third_party/WebKit/public/platform/WebCanvas.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace printing {
@ -112,13 +111,13 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
gfx::Rect canvas_area = content_area;
{
SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
cc::PaintCanvas* canvas = metafile->GetVectorCanvasForNewPage(
*page_size, canvas_area, scale_factor);
if (!canvas)
return;
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsPreviewMetafile(*canvas, is_preview);
MetafileSkiaWrapper::SetMetafileOnCanvas(canvas, metafile);
cc::SetIsPreviewMetafile(canvas, is_preview);
RenderPageContent(frame, page_number, canvas_area, content_area,
scale_factor, static_cast<blink::WebCanvas*>(canvas));
}

View file

@ -14,7 +14,6 @@
#include "printing/page_size_margins.h"
#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@ -161,12 +160,12 @@ void PrintWebViewHelper::PrintPageInternal(
frame->getPrintPageShrink(params.page_number);
float scale_factor = css_scale_factor * webkit_page_shrink_factor;
SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
page_size, canvas_area, scale_factor);
cc::PaintCanvas* canvas =
metafile->GetVectorCanvasForNewPage(page_size, canvas_area, scale_factor);
if (!canvas)
return;
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
MetafileSkiaWrapper::SetMetafileOnCanvas(canvas, metafile);
#if 0
if (params.params.display_header_footer) {