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

Unified Diff: components/html_viewer/html_document_application_delegate.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/html_document_application_delegate.h ('k') | components/html_viewer/html_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_document_application_delegate.cc
diff --git a/components/html_viewer/html_document_application_delegate.cc b/components/html_viewer/html_document_application_delegate.cc
index caa6427b9bd2f7bd57c33bc0c2466b8e9934de1b..5da6b38e5c205f633aeff50c8dd5eb9ac2748410 100644
--- a/components/html_viewer/html_document_application_delegate.cc
+++ b/components/html_viewer/html_document_application_delegate.cc
@@ -93,7 +93,9 @@ void HTMLDocumentApplicationDelegate::OnTerminate() {
}
// ApplicationDelegate;
-void HTMLDocumentApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
+void HTMLDocumentApplicationDelegate::Initialize(mojo::Shell* shell,
+ const std::string& url,
+ uint32_t id) {
app_.ConnectToService("mojo:network_service", &url_loader_factory_);
}
@@ -135,8 +137,7 @@ bool HTMLDocumentApplicationDelegate::AcceptConnection(
mojo::URLLoader* raw_loader = loader.get();
// The app needs to stay alive while waiting for the response to be
// available.
- scoped_ptr<mojo::AppRefCount> app_retainer(
- app_.app_lifetime_helper()->CreateAppRefCount());
+ scoped_ptr<mojo::AppRefCount> app_retainer(app_.CreateAppRefCount());
raw_loader->Start(
std::move(request),
base::Bind(&HTMLDocumentApplicationDelegate::OnResponseReceived,
« no previous file with comments | « components/html_viewer/html_document_application_delegate.h ('k') | components/html_viewer/html_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698