| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 4454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4465 // Convert std::vector of GURLs to WebVector<WebURL> | 4465 // Convert std::vector of GURLs to WebVector<WebURL> |
| 4466 WebVector<WebURL> weburl_links(original_urls); | 4466 WebVector<WebURL> weburl_links(original_urls); |
| 4467 | 4467 |
| 4468 // Convert std::vector of base::FilePath to WebVector<WebString> | 4468 // Convert std::vector of base::FilePath to WebVector<WebString> |
| 4469 WebVector<WebString> webstring_paths(equivalent_local_paths.size()); | 4469 WebVector<WebString> webstring_paths(equivalent_local_paths.size()); |
| 4470 for (size_t i = 0; i < equivalent_local_paths.size(); i++) | 4470 for (size_t i = 0; i < equivalent_local_paths.size(); i++) |
| 4471 webstring_paths[i] = equivalent_local_paths[i].AsUTF16Unsafe(); | 4471 webstring_paths[i] = equivalent_local_paths[i].AsUTF16Unsafe(); |
| 4472 | 4472 |
| 4473 // Serialize the frame (without recursing into subframes). | 4473 // Serialize the frame (without recursing into subframes). |
| 4474 WebPageSerializer::serialize(GetWebFrame(), | 4474 WebPageSerializer::serialize(GetWebFrame(), |
| 4475 false, // recursive? nope. | |
| 4476 this, // WebPageSerializerClient. | 4475 this, // WebPageSerializerClient. |
| 4477 weburl_links, webstring_paths, | 4476 weburl_links, webstring_paths, |
| 4478 local_directory_path.AsUTF16Unsafe()); | 4477 local_directory_path.AsUTF16Unsafe()); |
| 4479 } | 4478 } |
| 4480 | 4479 |
| 4481 void RenderFrameImpl::OpenURL(WebFrame* frame, | 4480 void RenderFrameImpl::OpenURL(WebFrame* frame, |
| 4482 const GURL& url, | 4481 const GURL& url, |
| 4483 const Referrer& referrer, | 4482 const Referrer& referrer, |
| 4484 WebNavigationPolicy policy) { | 4483 WebNavigationPolicy policy) { |
| 4485 DCHECK_EQ(frame_, frame); | 4484 DCHECK_EQ(frame_, frame); |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5169 mojo::ServiceProviderPtr service_provider; | 5168 mojo::ServiceProviderPtr service_provider; |
| 5170 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5169 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 5171 request->url = mojo::String::From(url); | 5170 request->url = mojo::String::From(url); |
| 5172 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5171 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
| 5173 nullptr, nullptr, | 5172 nullptr, nullptr, |
| 5174 base::Bind(&OnGotContentHandlerID)); | 5173 base::Bind(&OnGotContentHandlerID)); |
| 5175 return service_provider.Pass(); | 5174 return service_provider.Pass(); |
| 5176 } | 5175 } |
| 5177 | 5176 |
| 5178 } // namespace content | 5177 } // namespace content |
| OLD | NEW |