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

Unified Diff: blimp/engine/app/blimp_content_browser_client.cc

Issue 2157143002: Move interface registration to OnConnect in RPH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « blimp/engine/app/blimp_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/app/blimp_content_browser_client.cc
diff --git a/blimp/engine/app/blimp_content_browser_client.cc b/blimp/engine/app/blimp_content_browser_client.cc
index 2afbe417c63db231c4f2c3d2f7719addb45fcc8b..17def3952bb6f337c6c0fee57f01c07cd4ff8cb0 100644
--- a/blimp/engine/app/blimp_content_browser_client.cc
+++ b/blimp/engine/app/blimp_content_browser_client.cc
@@ -6,6 +6,9 @@
#include "blimp/engine/app/blimp_browser_main_parts.h"
#include "blimp/engine/app/settings_manager.h"
#include "blimp/engine/mojo/blob_channel_service.h"
+#include "blimp/net/blob_channel/blob_channel_sender.h"
+#include "content/public/browser/browser_thread.h"
+#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/interface_registry.h"
namespace blimp {
@@ -40,11 +43,17 @@ BlimpBrowserContext* BlimpContentBrowserClient::GetBrowserContext() {
}
void BlimpContentBrowserClient::ExposeInterfacesToRenderer(
- shell::InterfaceRegistry* registry,
- content::RenderProcessHost* render_process_host) {
- registry->AddInterface<mojom::BlobChannel>(
- base::Bind(&BlobChannelService::Create,
- blimp_browser_main_parts_->GetBlobChannelSender()));
+ shell::Connection* connection) {
+ connection->GetInterfaceRegistry()->AddInterface(base::Bind(
+ &BlimpContentBrowserClient::BindBlobChannel, base::Unretained(this)),
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::UI));
+}
+
+void BlimpContentBrowserClient::BindBlobChannel(
+ mojom::BlobChannelRequest request) {
+ BlobChannelService::Create(blimp_browser_main_parts_->GetBlobChannelSender(),
+ std::move(request));
}
} // namespace engine
« no previous file with comments | « blimp/engine/app/blimp_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698