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

Unified Diff: components/web_view/frame_connection.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/frame_connection.h ('k') | components/web_view/frame_devtools_agent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/frame_connection.cc
diff --git a/components/web_view/frame_connection.cc b/components/web_view/frame_connection.cc
index 70e8d2d2c3d28bdfd55180c9d7ef5df56daf0f6b..c3417d7337a43519191d071158bb3b2fadd727e2 100644
--- a/components/web_view/frame_connection.cc
+++ b/components/web_view/frame_connection.cc
@@ -23,7 +23,7 @@
#include "mojo/services/network/public/interfaces/web_socket_factory.mojom.h"
#include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
#if defined(OS_LINUX) && !defined(OS_ANDROID)
#include "components/font_service/public/interfaces/font_service.mojom.h"
@@ -58,18 +58,18 @@ FrameConnection::~FrameConnection() {
// static
void FrameConnection::CreateConnectionForCanNavigateFrame(
- mojo::ApplicationImpl* app,
+ mojo::Shell* shell,
Frame* frame,
mojo::URLRequestPtr request,
const FrameTreeDelegate::CanNavigateFrameCallback& callback) {
scoped_ptr<FrameConnection> frame_connection(new FrameConnection);
FrameConnection* connection = frame_connection.get();
- connection->Init(app, std::move(request),
+ connection->Init(shell, std::move(request),
base::Bind(&OnGotContentHandlerForFrame, frame->app_id(),
callback, base::Passed(&frame_connection)));
}
-void FrameConnection::Init(mojo::ApplicationImpl* app,
+void FrameConnection::Init(mojo::Shell* shell,
mojo::URLRequestPtr request,
const base::Closure& on_got_id_callback) {
DCHECK(!application_connection_);
@@ -117,9 +117,9 @@ void FrameConnection::Init(mojo::ApplicationImpl* app,
std::move(font_service_interfaces));
#endif
- mojo::ApplicationImpl::ConnectParams params(std::move(request));
+ mojo::Shell::ConnectParams params(std::move(request));
params.set_filter(std::move(filter));
- application_connection_ = app->ConnectToApplication(&params);
+ application_connection_ = shell->ConnectToApplication(&params);
application_connection_->ConnectToService(&frame_client_);
application_connection_->AddRemoteIDCallback(on_got_id_callback);
}
« no previous file with comments | « components/web_view/frame_connection.h ('k') | components/web_view/frame_devtools_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698