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 4452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4463 // Convert std::vector of GURLs to WebVector<WebURL> | 4463 // Convert std::vector of GURLs to WebVector<WebURL> |
4464 WebVector<WebURL> weburl_links(original_urls); | 4464 WebVector<WebURL> weburl_links(original_urls); |
4465 | 4465 |
4466 // Convert std::vector of base::FilePath to WebVector<WebString> | 4466 // Convert std::vector of base::FilePath to WebVector<WebString> |
4467 WebVector<WebString> webstring_paths(equivalent_local_paths.size()); | 4467 WebVector<WebString> webstring_paths(equivalent_local_paths.size()); |
4468 for (size_t i = 0; i < equivalent_local_paths.size(); i++) | 4468 for (size_t i = 0; i < equivalent_local_paths.size(); i++) |
4469 webstring_paths[i] = equivalent_local_paths[i].AsUTF16Unsafe(); | 4469 webstring_paths[i] = equivalent_local_paths[i].AsUTF16Unsafe(); |
4470 | 4470 |
4471 // Serialize the frame (without recursing into subframes). | 4471 // Serialize the frame (without recursing into subframes). |
4472 WebPageSerializer::serialize(GetWebFrame(), | 4472 WebPageSerializer::serialize(GetWebFrame(), |
4473 false, // recursive? nope. | |
4474 this, // WebPageSerializerClient. | 4473 this, // WebPageSerializerClient. |
4475 weburl_links, webstring_paths, | 4474 weburl_links, webstring_paths, |
4476 local_directory_path.AsUTF16Unsafe()); | 4475 local_directory_path.AsUTF16Unsafe()); |
4477 } | 4476 } |
4478 | 4477 |
4479 void RenderFrameImpl::OpenURL(WebFrame* frame, | 4478 void RenderFrameImpl::OpenURL(WebFrame* frame, |
4480 const GURL& url, | 4479 const GURL& url, |
4481 const Referrer& referrer, | 4480 const Referrer& referrer, |
4482 WebNavigationPolicy policy) { | 4481 WebNavigationPolicy policy) { |
4483 DCHECK_EQ(frame_, frame); | 4482 DCHECK_EQ(frame_, frame); |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5174 mojo::ServiceProviderPtr service_provider; | 5173 mojo::ServiceProviderPtr service_provider; |
5175 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5174 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5176 request->url = mojo::String::From(url); | 5175 request->url = mojo::String::From(url); |
5177 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5176 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5178 nullptr, nullptr, | 5177 nullptr, nullptr, |
5179 base::Bind(&OnGotContentHandlerID)); | 5178 base::Bind(&OnGotContentHandlerID)); |
5180 return service_provider.Pass(); | 5179 return service_provider.Pass(); |
5181 } | 5180 } |
5182 | 5181 |
5183 } // namespace content | 5182 } // namespace content |
OLD | NEW |