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

Unified Diff: components/html_viewer/layout_test_html_viewer.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 | « components/html_viewer/layout_test_html_viewer.h ('k') | components/html_viewer/media_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/layout_test_html_viewer.cc
diff --git a/components/html_viewer/layout_test_html_viewer.cc b/components/html_viewer/layout_test_html_viewer.cc
index 2466496595e3f48999eb74ca64002a7b6deef9e8..115539e26d785f2e6420fefbcc19606e82dc428c 100644
--- a/components/html_viewer/layout_test_html_viewer.cc
+++ b/components/html_viewer/layout_test_html_viewer.cc
@@ -20,8 +20,9 @@ LayoutTestHTMLViewer::LayoutTestHTMLViewer() {
LayoutTestHTMLViewer::~LayoutTestHTMLViewer() {
}
-void LayoutTestHTMLViewer::Initialize(mojo::ApplicationImpl* app) {
- HTMLViewer::Initialize(app);
+void LayoutTestHTMLViewer::Initialize(mojo::Shell* shell,
+ const std::string& url, uint32_t id) {
+ HTMLViewer::Initialize(shell, url, id);
global_state()->InitIfNecessary(gfx::Size(800, 600), 1.f);
test_interfaces_.reset(new test_runner::WebTestInterfaces);
test_interfaces_->ResetAll();
@@ -39,14 +40,14 @@ void LayoutTestHTMLViewer::TestFinished() {
test_interfaces_->ResetAll();
web_view::LayoutTestRunnerPtr test_runner_ptr;
- app()->ConnectToService("mojo:web_view_test_runner", &test_runner_ptr);
+ shell()->ConnectToService("mojo:web_view_test_runner", &test_runner_ptr);
test_runner_ptr->TestFinished();
}
void LayoutTestHTMLViewer::Create(
mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::shell::mojom::ContentHandler> request) {
- new LayoutTestContentHandlerImpl(global_state(), app(), std::move(request),
+ new LayoutTestContentHandlerImpl(global_state(), shell(), std::move(request),
test_interfaces_.get(), &test_delegate_);
}
« no previous file with comments | « components/html_viewer/layout_test_html_viewer.h ('k') | components/html_viewer/media_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698