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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "content/public/common/result_codes.h" 116 #include "content/public/common/result_codes.h"
117 #include "content/public/common/url_constants.h" 117 #include "content/public/common/url_constants.h"
118 #include "content/public/common/url_utils.h" 118 #include "content/public/common/url_utils.h"
119 #include "content/public/common/web_preferences.h" 119 #include "content/public/common/web_preferences.h"
120 #include "device/geolocation/geolocation_service_context.h" 120 #include "device/geolocation/geolocation_service_context.h"
121 #include "net/base/url_util.h" 121 #include "net/base/url_util.h"
122 #include "net/http/http_cache.h" 122 #include "net/http/http_cache.h"
123 #include "net/http/http_transaction_factory.h" 123 #include "net/http/http_transaction_factory.h"
124 #include "net/url_request/url_request_context.h" 124 #include "net/url_request/url_request_context.h"
125 #include "net/url_request/url_request_context_getter.h" 125 #include "net/url_request/url_request_context_getter.h"
126 #include "services/shell/public/cpp/interface_provider.h"
126 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 127 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
127 #include "third_party/skia/include/core/SkBitmap.h" 128 #include "third_party/skia/include/core/SkBitmap.h"
128 #include "ui/accessibility/ax_tree_combiner.h" 129 #include "ui/accessibility/ax_tree_combiner.h"
129 #include "ui/base/layout.h" 130 #include "ui/base/layout.h"
130 #include "ui/events/blink/web_input_event_traits.h" 131 #include "ui/events/blink/web_input_event_traits.h"
131 #include "ui/gl/gl_switches.h" 132 #include "ui/gl/gl_switches.h"
132 133
133 #if defined(OS_ANDROID) 134 #if defined(OS_ANDROID)
134 #include "content/browser/android/content_video_view.h" 135 #include "content/browser/android/content_video_view.h"
135 #include "content/browser/android/date_time_chooser_android.h" 136 #include "content/browser/android/date_time_chooser_android.h"
137 #include "content/browser/android/java_interfaces_impl.h"
136 #include "content/browser/media/android/media_web_contents_observer_android.h" 138 #include "content/browser/media/android/media_web_contents_observer_android.h"
137 #include "content/browser/web_contents/web_contents_android.h" 139 #include "content/browser/web_contents/web_contents_android.h"
138 #endif // OS_ANDROID 140 #endif // OS_ANDROID
139 141
140 #if defined(OS_MACOSX) 142 #if defined(OS_MACOSX)
141 #include "base/mac/foundation_util.h" 143 #include "base/mac/foundation_util.h"
142 #endif 144 #endif
143 145
144 #if defined(USE_AURA) 146 #if defined(USE_AURA)
145 #include "content/browser/web_contents/web_contents_view_mus.h" 147 #include "content/browser/web_contents/web_contents_view_mus.h"
(...skipping 4826 matching lines...) Expand 10 before | Expand all | Expand 10 after
4972 void WebContentsImpl::RequestFindMatchRects(int current_version) { 4974 void WebContentsImpl::RequestFindMatchRects(int current_version) {
4973 GetOrCreateFindRequestManager()->RequestFindMatchRects(current_version); 4975 GetOrCreateFindRequestManager()->RequestFindMatchRects(current_version);
4974 } 4976 }
4975 4977
4976 bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() { 4978 bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {
4977 return CreateRenderViewForRenderManager( 4979 return CreateRenderViewForRenderManager(
4978 GetRenderViewHost(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, 4980 GetRenderViewHost(), MSG_ROUTING_NONE, MSG_ROUTING_NONE,
4979 frame_tree_.root()->current_replication_state()); 4981 frame_tree_.root()->current_replication_state());
4980 } 4982 }
4981 4983
4984 shell::InterfaceProvider* WebContentsImpl::GetJavaInterfaces() {
4985 if (!java_interfaces_) {
4986 shell::mojom::InterfaceProviderPtr provider;
4987 BindInterfaceRegistryForWebContents(mojo::GetProxy(&provider), this);
4988 java_interfaces_.reset(new shell::InterfaceProvider);
4989 java_interfaces_->Bind(std::move(provider));
4990 }
4991 return java_interfaces_.get();
4992 }
4993
4982 #elif defined(OS_MACOSX) 4994 #elif defined(OS_MACOSX)
4983 4995
4984 void WebContentsImpl::SetAllowOtherViews(bool allow) { 4996 void WebContentsImpl::SetAllowOtherViews(bool allow) {
4985 view_->SetAllowOtherViews(allow); 4997 view_->SetAllowOtherViews(allow);
4986 } 4998 }
4987 4999
4988 bool WebContentsImpl::GetAllowOtherViews() { 5000 bool WebContentsImpl::GetAllowOtherViews() {
4989 return view_->GetAllowOtherViews(); 5001 return view_->GetAllowOtherViews();
4990 } 5002 }
4991 5003
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
5232 dialog_manager_ = dialog_manager; 5244 dialog_manager_ = dialog_manager;
5233 } 5245 }
5234 5246
5235 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5247 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5236 auto it = binding_sets_.find(interface_name); 5248 auto it = binding_sets_.find(interface_name);
5237 if (it != binding_sets_.end()) 5249 if (it != binding_sets_.end())
5238 binding_sets_.erase(it); 5250 binding_sets_.erase(it);
5239 } 5251 }
5240 5252
5241 } // namespace content 5253 } // namespace content
OLDNEW
« 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