| OLD | NEW |
| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 #include "content/public/common/browser_side_navigation_policy.h" | 113 #include "content/public/common/browser_side_navigation_policy.h" |
| 114 #include "content/public/common/child_process_host.h" | 114 #include "content/public/common/child_process_host.h" |
| 115 #include "content/public/common/content_constants.h" | 115 #include "content/public/common/content_constants.h" |
| 116 #include "content/public/common/content_switches.h" | 116 #include "content/public/common/content_switches.h" |
| 117 #include "content/public/common/page_zoom.h" | 117 #include "content/public/common/page_zoom.h" |
| 118 #include "content/public/common/result_codes.h" | 118 #include "content/public/common/result_codes.h" |
| 119 #include "content/public/common/url_constants.h" | 119 #include "content/public/common/url_constants.h" |
| 120 #include "content/public/common/url_utils.h" | 120 #include "content/public/common/url_utils.h" |
| 121 #include "content/public/common/web_preferences.h" | 121 #include "content/public/common/web_preferences.h" |
| 122 #include "device/geolocation/geolocation_service_context.h" | 122 #include "device/geolocation/geolocation_service_context.h" |
| 123 #include "device/nfc/nfc.mojom.h" |
| 123 #include "net/base/url_util.h" | 124 #include "net/base/url_util.h" |
| 124 #include "net/http/http_cache.h" | 125 #include "net/http/http_cache.h" |
| 125 #include "net/http/http_transaction_factory.h" | 126 #include "net/http/http_transaction_factory.h" |
| 126 #include "net/url_request/url_request_context.h" | 127 #include "net/url_request/url_request_context.h" |
| 127 #include "net/url_request/url_request_context_getter.h" | 128 #include "net/url_request/url_request_context_getter.h" |
| 128 #include "services/shell/public/cpp/interface_provider.h" | 129 #include "services/shell/public/cpp/interface_provider.h" |
| 129 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 130 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
| 130 #include "third_party/skia/include/core/SkBitmap.h" | 131 #include "third_party/skia/include/core/SkBitmap.h" |
| 131 #include "ui/accessibility/ax_tree_combiner.h" | 132 #include "ui/accessibility/ax_tree_combiner.h" |
| 132 #include "ui/base/layout.h" | 133 #include "ui/base/layout.h" |
| (...skipping 3950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4083 | 4084 |
| 4084 if (!render_frame_host->IsRenderFrameLive() || render_frame_host->GetParent()) | 4085 if (!render_frame_host->IsRenderFrameLive() || render_frame_host->GetParent()) |
| 4085 return; | 4086 return; |
| 4086 | 4087 |
| 4087 NavigationEntry* entry = controller_.GetPendingEntry(); | 4088 NavigationEntry* entry = controller_.GetPendingEntry(); |
| 4088 if (entry && entry->IsViewSourceMode()) { | 4089 if (entry && entry->IsViewSourceMode()) { |
| 4089 // Put the renderer in view source mode. | 4090 // Put the renderer in view source mode. |
| 4090 render_frame_host->Send( | 4091 render_frame_host->Send( |
| 4091 new FrameMsg_EnableViewSourceMode(render_frame_host->GetRoutingID())); | 4092 new FrameMsg_EnableViewSourceMode(render_frame_host->GetRoutingID())); |
| 4092 } | 4093 } |
| 4094 #if defined(OS_ANDROID) |
| 4095 render_frame_host->GetInterfaceRegistry()->AddInterface( |
| 4096 GetJavaInterfaces()->CreateInterfaceFactory<device::nfc::mojom::NFC>()); |
| 4097 #endif |
| 4093 } | 4098 } |
| 4094 | 4099 |
| 4095 void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) { | 4100 void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) { |
| 4096 FOR_EACH_OBSERVER(WebContentsObserver, | 4101 FOR_EACH_OBSERVER(WebContentsObserver, |
| 4097 observers_, | 4102 observers_, |
| 4098 RenderFrameDeleted(render_frame_host)); | 4103 RenderFrameDeleted(render_frame_host)); |
| 4099 } | 4104 } |
| 4100 | 4105 |
| 4101 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host, | 4106 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host, |
| 4102 const ContextMenuParams& params) { | 4107 const ContextMenuParams& params) { |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5254 dialog_manager_ = dialog_manager; | 5259 dialog_manager_ = dialog_manager; |
| 5255 } | 5260 } |
| 5256 | 5261 |
| 5257 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5262 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5258 auto it = binding_sets_.find(interface_name); | 5263 auto it = binding_sets_.find(interface_name); |
| 5259 if (it != binding_sets_.end()) | 5264 if (it != binding_sets_.end()) |
| 5260 binding_sets_.erase(it); | 5265 binding_sets_.erase(it); |
| 5261 } | 5266 } |
| 5262 | 5267 |
| 5263 } // namespace content | 5268 } // namespace content |
| OLD | NEW |