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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2214383002: Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: rebase Created 4 years, 2 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "content/public/common/browser_side_navigation_policy.h" 111 #include "content/public/common/browser_side_navigation_policy.h"
112 #include "content/public/common/child_process_host.h" 112 #include "content/public/common/child_process_host.h"
113 #include "content/public/common/content_constants.h" 113 #include "content/public/common/content_constants.h"
114 #include "content/public/common/content_switches.h" 114 #include "content/public/common/content_switches.h"
115 #include "content/public/common/page_zoom.h" 115 #include "content/public/common/page_zoom.h"
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 "device/nfc/nfc.mojom.h"
121 #include "net/base/url_util.h" 122 #include "net/base/url_util.h"
122 #include "net/http/http_cache.h" 123 #include "net/http/http_cache.h"
123 #include "net/http/http_transaction_factory.h" 124 #include "net/http/http_transaction_factory.h"
124 #include "net/url_request/url_request_context.h" 125 #include "net/url_request/url_request_context.h"
125 #include "net/url_request/url_request_context_getter.h" 126 #include "net/url_request/url_request_context_getter.h"
126 #include "services/shell/public/cpp/interface_provider.h" 127 #include "services/shell/public/cpp/interface_provider.h"
127 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 128 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
128 #include "third_party/skia/include/core/SkBitmap.h" 129 #include "third_party/skia/include/core/SkBitmap.h"
129 #include "ui/accessibility/ax_tree_combiner.h" 130 #include "ui/accessibility/ax_tree_combiner.h"
130 #include "ui/base/layout.h" 131 #include "ui/base/layout.h"
(...skipping 3946 matching lines...) Expand 10 before | Expand all | Expand 10 after
4077 4078
4078 if (!render_frame_host->IsRenderFrameLive() || render_frame_host->GetParent()) 4079 if (!render_frame_host->IsRenderFrameLive() || render_frame_host->GetParent())
4079 return; 4080 return;
4080 4081
4081 NavigationEntry* entry = controller_.GetPendingEntry(); 4082 NavigationEntry* entry = controller_.GetPendingEntry();
4082 if (entry && entry->IsViewSourceMode()) { 4083 if (entry && entry->IsViewSourceMode()) {
4083 // Put the renderer in view source mode. 4084 // Put the renderer in view source mode.
4084 render_frame_host->Send( 4085 render_frame_host->Send(
4085 new FrameMsg_EnableViewSourceMode(render_frame_host->GetRoutingID())); 4086 new FrameMsg_EnableViewSourceMode(render_frame_host->GetRoutingID()));
4086 } 4087 }
4088 #if defined(OS_ANDROID)
4089 render_frame_host->GetInterfaceRegistry()->AddInterface(
4090 GetJavaInterfaces()->CreateInterfaceFactory<device::nfc::mojom::NFC>());
4091 #endif
4087 } 4092 }
4088 4093
4089 void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) { 4094 void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) {
4090 FOR_EACH_OBSERVER(WebContentsObserver, 4095 FOR_EACH_OBSERVER(WebContentsObserver,
4091 observers_, 4096 observers_,
4092 RenderFrameDeleted(render_frame_host)); 4097 RenderFrameDeleted(render_frame_host));
4093 } 4098 }
4094 4099
4095 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host, 4100 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
4096 const ContextMenuParams& params) { 4101 const ContextMenuParams& params) {
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
5244 dialog_manager_ = dialog_manager; 5249 dialog_manager_ = dialog_manager;
5245 } 5250 }
5246 5251
5247 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5252 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5248 auto it = binding_sets_.find(interface_name); 5253 auto it = binding_sets_.find(interface_name);
5249 if (it != binding_sets_.end()) 5254 if (it != binding_sets_.end())
5250 binding_sets_.erase(it); 5255 binding_sets_.erase(it);
5251 } 5256 }
5252 5257
5253 } // namespace content 5258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698