| 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 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 std::vector<std::string> pair = base::SplitString( | 2793 std::vector<std::string> pair = base::SplitString( |
| 2794 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 2794 key_value, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 2795 DCHECK_EQ(2ul, pair.size()); | 2795 DCHECK_EQ(2ul, pair.size()); |
| 2796 params->add_request_header(pair[0], pair[1]); | 2796 params->add_request_header(pair[0], pair[1]); |
| 2797 } | 2797 } |
| 2798 } | 2798 } |
| 2799 dlm->DownloadUrl(std::move(params)); | 2799 dlm->DownloadUrl(std::move(params)); |
| 2800 } | 2800 } |
| 2801 | 2801 |
| 2802 void WebContentsImpl::GenerateMHTML( | 2802 void WebContentsImpl::GenerateMHTML( |
| 2803 const base::FilePath& file, | 2803 const MHTMLGenerationParams& params, |
| 2804 bool use_binary_encoding, | |
| 2805 const base::Callback<void(int64_t)>& callback) { | 2804 const base::Callback<void(int64_t)>& callback) { |
| 2806 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, use_binary_encoding, | 2805 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, params, callback); |
| 2807 file, callback); | |
| 2808 } | 2806 } |
| 2809 | 2807 |
| 2810 const std::string& WebContentsImpl::GetContentsMimeType() const { | 2808 const std::string& WebContentsImpl::GetContentsMimeType() const { |
| 2811 return contents_mime_type_; | 2809 return contents_mime_type_; |
| 2812 } | 2810 } |
| 2813 | 2811 |
| 2814 bool WebContentsImpl::WillNotifyDisconnection() const { | 2812 bool WebContentsImpl::WillNotifyDisconnection() const { |
| 2815 return notify_disconnection_; | 2813 return notify_disconnection_; |
| 2816 } | 2814 } |
| 2817 | 2815 |
| (...skipping 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5032 for (RenderViewHost* render_view_host : render_view_host_set) | 5030 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5033 render_view_host->OnWebkitPreferencesChanged(); | 5031 render_view_host->OnWebkitPreferencesChanged(); |
| 5034 } | 5032 } |
| 5035 | 5033 |
| 5036 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5034 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 5037 JavaScriptDialogManager* dialog_manager) { | 5035 JavaScriptDialogManager* dialog_manager) { |
| 5038 dialog_manager_ = dialog_manager; | 5036 dialog_manager_ = dialog_manager; |
| 5039 } | 5037 } |
| 5040 | 5038 |
| 5041 } // namespace content | 5039 } // namespace content |
| OLD | NEW |