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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2217813003: Add global and per-WebContents java InterfaceRegistries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-interface-registry
Patch Set: Created 4 years, 3 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 | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4d9458af5d687472fd90c0df8b1ca633c1435833..10187d104037ca97078b9e33ddeca6b6f2b2886f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -123,6 +123,7 @@
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+#include "services/shell/public/cpp/interface_provider.h"
#include "third_party/WebKit/public/web/WebSandboxFlags.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/accessibility/ax_tree_combiner.h"
@@ -133,6 +134,7 @@
#if defined(OS_ANDROID)
#include "content/browser/android/content_video_view.h"
#include "content/browser/android/date_time_chooser_android.h"
+#include "content/browser/android/java_interfaces_impl.h"
#include "content/browser/media/android/media_web_contents_observer_android.h"
#include "content/browser/web_contents/web_contents_android.h"
#endif // OS_ANDROID
@@ -4979,6 +4981,16 @@ bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {
frame_tree_.root()->current_replication_state());
}
+shell::InterfaceProvider* WebContentsImpl::GetJavaInterfaces() {
+ if (!java_interfaces_) {
+ shell::mojom::InterfaceProviderPtr provider;
+ BindInterfaceRegistryForWebContents(mojo::GetProxy(&provider), this);
+ java_interfaces_.reset(new shell::InterfaceProvider);
+ java_interfaces_->Bind(std::move(provider));
+ }
+ return java_interfaces_.get();
+}
+
#elif defined(OS_MACOSX)
void WebContentsImpl::SetAllowOtherViews(bool allow) {
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698