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

Unified Diff: sky/viewer/document_view.cc

Issue 797063002: Make reftests work for sky. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: cleanup Created 6 years 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: sky/viewer/document_view.cc
diff --git a/sky/viewer/document_view.cc b/sky/viewer/document_view.cc
index 51eae14a4c3aa48952c152ec157ee0c27f8d7678..f7cb1833d3ca77753cd107526c35f7cb9a6fd570 100644
--- a/sky/viewer/document_view.cc
+++ b/sky/viewer/document_view.cc
@@ -73,15 +73,17 @@ static int s_next_debugger_id = 1;
DocumentView::DocumentView(
mojo::ServiceProviderPtr provider,
mojo::URLResponsePtr response,
- mojo::Shell* shell)
+ mojo::Shell* shell,
+ bool is_testing)
: response_(response.Pass()),
shell_(shell),
web_view_(NULL),
root_(NULL),
view_manager_client_factory_(shell_, this),
inspector_service_factory_(this),
+ weak_factory_(this),
debugger_id_(s_next_debugger_id++),
- weak_factory_(this) {
+ is_testing_(is_testing) {
exported_services_.AddService(&view_manager_client_factory_);
mojo::WeakBindToPipe(&exported_services_, provider.PassMessagePipe());
}
@@ -131,10 +133,14 @@ void DocumentView::Load(mojo::URLResponsePtr response) {
void DocumentView::initializeLayerTreeView() {
layer_host_.reset(new LayerHost(this));
- root_layer_ = make_scoped_refptr(new Layer(this));
+ root_layer_ = make_scoped_refptr(new Layer(this, is_testing_));
layer_host_->SetRootLayer(root_layer_);
}
+std::string DocumentView::GetPixelsForTesting() {
+ return layer_host_->GetPixelsForTesting();
+}
+
mojo::Shell* DocumentView::GetShell() {
return shell_;
}

Powered by Google App Engine
This is Rietveld 408576698