Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: components/html_viewer/media_factory.cc

Issue 1409123005: Add methods for telling V8 how much memory audio/video is using. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix html viewer. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/media_factory.cc
diff --git a/components/html_viewer/media_factory.cc b/components/html_viewer/media_factory.cc
index 260df923657f7b982f960f5f3ee30929eaf0caba..4d155d34f8d11b6f8b6a8276cb270a76a434ce9b 100644
--- a/components/html_viewer/media_factory.cc
+++ b/components/html_viewer/media_factory.cc
@@ -28,6 +28,8 @@
#include "media/renderers/gpu_video_accelerator_factories.h"
#include "mojo/application/public/cpp/connect.h"
#include "mojo/application/public/interfaces/shell.mojom.h"
+#include "third_party/WebKit/public/web/WebKit.h"
+#include "v8/include/v8.h"
namespace html_viewer {
@@ -98,6 +100,8 @@ blink::WebMediaPlayer* MediaFactory::CreateMediaPlayer(
media::WebMediaPlayerParams::DeferLoadCB(), CreateAudioRendererSink(),
media_log, GetMediaThreadTaskRunner(), GetMediaThreadTaskRunner(),
compositor_task_runner_, media::WebMediaPlayerParams::Context3DCB(),
+ base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
+ base::Unretained(blink::mainThreadIsolate())),
GetMediaPermission(), initial_cdm);
base::WeakPtr<media::WebMediaPlayerDelegate> delegate;
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698