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

Unified Diff: components/web_view/web_view_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/web_view/web_view_application_delegate.h ('k') | components/web_view/web_view_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/web_view_application_delegate.cc
diff --git a/components/web_view/web_view_application_delegate.cc b/components/web_view/web_view_application_delegate.cc
index d73aa781efc6a8053d11b54f96a98297244678e3..f264fe5ff47bb7e3b82a5c1ec3baaf12561e58fe 100644
--- a/components/web_view/web_view_application_delegate.cc
+++ b/components/web_view/web_view_application_delegate.cc
@@ -11,12 +11,14 @@
namespace web_view {
-WebViewApplicationDelegate::WebViewApplicationDelegate() : app_(nullptr) {}
+WebViewApplicationDelegate::WebViewApplicationDelegate() : shell_(nullptr) {}
WebViewApplicationDelegate::~WebViewApplicationDelegate() {}
-void WebViewApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
- app_ = app;
- tracing_.Initialize(app);
+void WebViewApplicationDelegate::Initialize(mojo::Shell* shell,
+ const std::string& url,
+ uint32_t id) {
+ shell_ = shell;
+ tracing_.Initialize(shell, url);
}
bool WebViewApplicationDelegate::AcceptConnection(
@@ -28,7 +30,7 @@ bool WebViewApplicationDelegate::AcceptConnection(
void WebViewApplicationDelegate::CreateWebView(
mojom::WebViewClientPtr client,
mojo::InterfaceRequest<mojom::WebView> web_view) {
- new WebViewImpl(app_, std::move(client), std::move(web_view));
+ new WebViewImpl(shell_, std::move(client), std::move(web_view));
}
void WebViewApplicationDelegate::Create(
« no previous file with comments | « components/web_view/web_view_application_delegate.h ('k') | components/web_view/web_view_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698