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

Unified Diff: content/shell/renderer/test_runner/test_plugin.cc

Issue 1142463002: Plumb dependencies on content from test plugin through the delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: content/shell/renderer/test_runner/test_plugin.cc
diff --git a/content/shell/renderer/test_runner/test_plugin.cc b/content/shell/renderer/test_runner/test_plugin.cc
index e47d7142f0995de60fc401a0589a363aa16b6264..7a15983eff3338cf2286376b33295e63c4ffe019 100644
--- a/content/shell/renderer/test_runner/test_plugin.cc
+++ b/content/shell/renderer/test_runner/test_plugin.cc
@@ -10,7 +10,6 @@
#include "base/memory/shared_memory.h"
#include "base/strings/stringprintf.h"
#include "cc/resources/shared_bitmap_manager.h"
-#include "content/public/renderer/render_thread.h"
#include "content/shell/renderer/test_runner/web_test_delegate.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -223,7 +222,7 @@ bool TestPlugin::initialize(blink::WebPluginContainer* container) {
return false;
layer_ = cc::TextureLayer::CreateForMailbox(this);
- web_layer_ = make_scoped_ptr(InstantiateWebLayer(layer_));
+ web_layer_ = make_scoped_ptr(delegate_->InstantiateWebLayer(layer_));
container_ = container;
container_->setWebLayer(web_layer_.get());
if (re_request_touch_events_) {
@@ -312,7 +311,7 @@ void TestPlugin::updateGeometry(
texture_mailbox_ = cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
} else {
scoped_ptr<cc::SharedBitmap> bitmap =
- RenderThread::Get()->GetSharedBitmapManager()->AllocateSharedBitmap(
+ delegate_->GetSharedBitmapManager()->AllocateSharedBitmap(
gfx::Rect(rect_).size());
if (!bitmap) {
texture_mailbox_ = cc::TextureMailbox();
« no previous file with comments | « content/shell/renderer/test_runner/test_plugin.h ('k') | content/shell/renderer/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698