| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 #include "content/public/common/browser_side_navigation_policy.h" | 108 #include "content/public/common/browser_side_navigation_policy.h" |
| 109 #include "content/public/common/child_process_host.h" | 109 #include "content/public/common/child_process_host.h" |
| 110 #include "content/public/common/content_constants.h" | 110 #include "content/public/common/content_constants.h" |
| 111 #include "content/public/common/content_switches.h" | 111 #include "content/public/common/content_switches.h" |
| 112 #include "content/public/common/page_zoom.h" | 112 #include "content/public/common/page_zoom.h" |
| 113 #include "content/public/common/result_codes.h" | 113 #include "content/public/common/result_codes.h" |
| 114 #include "content/public/common/security_style.h" | 114 #include "content/public/common/security_style.h" |
| 115 #include "content/public/common/url_constants.h" | 115 #include "content/public/common/url_constants.h" |
| 116 #include "content/public/common/url_utils.h" | 116 #include "content/public/common/url_utils.h" |
| 117 #include "content/public/common/web_preferences.h" | 117 #include "content/public/common/web_preferences.h" |
| 118 #include "mojo/common/url_type_converters.h" | |
| 119 #include "net/base/url_util.h" | 118 #include "net/base/url_util.h" |
| 120 #include "net/http/http_cache.h" | 119 #include "net/http/http_cache.h" |
| 121 #include "net/http/http_transaction_factory.h" | 120 #include "net/http/http_transaction_factory.h" |
| 122 #include "net/url_request/url_request_context.h" | 121 #include "net/url_request/url_request_context.h" |
| 123 #include "net/url_request/url_request_context_getter.h" | 122 #include "net/url_request/url_request_context_getter.h" |
| 124 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 123 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
| 125 #include "third_party/skia/include/core/SkBitmap.h" | 124 #include "third_party/skia/include/core/SkBitmap.h" |
| 126 #include "ui/accessibility/ax_tree_combiner.h" | 125 #include "ui/accessibility/ax_tree_combiner.h" |
| 127 #include "ui/base/layout.h" | 126 #include "ui/base/layout.h" |
| 128 #include "ui/gl/gl_switches.h" | 127 #include "ui/gl/gl_switches.h" |
| (...skipping 2893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3022 // respond with a 400 HTTP error code to indicate that something went wrong. | 3021 // respond with a 400 HTTP error code to indicate that something went wrong. |
| 3023 BrowserThread::PostTask( | 3022 BrowserThread::PostTask( |
| 3024 BrowserThread::UI, FROM_HERE, | 3023 BrowserThread::UI, FROM_HERE, |
| 3025 base::Bind(&WebContentsImpl::OnDidDownloadImage, | 3024 base::Bind(&WebContentsImpl::OnDidDownloadImage, |
| 3026 weak_factory_.GetWeakPtr(), callback, download_id, url, 400, | 3025 weak_factory_.GetWeakPtr(), callback, download_id, url, 400, |
| 3027 nullptr, nullptr)); | 3026 nullptr, nullptr)); |
| 3028 return download_id; | 3027 return download_id; |
| 3029 } | 3028 } |
| 3030 | 3029 |
| 3031 mojo_image_downloader->DownloadImage( | 3030 mojo_image_downloader->DownloadImage( |
| 3032 mojo::String::From(url), is_favicon, max_bitmap_size, bypass_cache, | 3031 url, is_favicon, max_bitmap_size, bypass_cache, |
| 3033 base::Bind(&WebContentsImpl::OnDidDownloadImage, | 3032 base::Bind(&WebContentsImpl::OnDidDownloadImage, |
| 3034 weak_factory_.GetWeakPtr(), callback, download_id, url)); | 3033 weak_factory_.GetWeakPtr(), callback, download_id, url)); |
| 3035 return download_id; | 3034 return download_id; |
| 3036 } | 3035 } |
| 3037 | 3036 |
| 3038 bool WebContentsImpl::IsSubframe() const { | 3037 bool WebContentsImpl::IsSubframe() const { |
| 3039 return is_subframe_; | 3038 return is_subframe_; |
| 3040 } | 3039 } |
| 3041 | 3040 |
| 3042 void WebContentsImpl::Find(int request_id, | 3041 void WebContentsImpl::Find(int request_id, |
| (...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5126 for (RenderViewHost* render_view_host : render_view_host_set) | 5125 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5127 render_view_host->OnWebkitPreferencesChanged(); | 5126 render_view_host->OnWebkitPreferencesChanged(); |
| 5128 } | 5127 } |
| 5129 | 5128 |
| 5130 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5129 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 5131 JavaScriptDialogManager* dialog_manager) { | 5130 JavaScriptDialogManager* dialog_manager) { |
| 5132 dialog_manager_ = dialog_manager; | 5131 dialog_manager_ = dialog_manager; |
| 5133 } | 5132 } |
| 5134 | 5133 |
| 5135 } // namespace content | 5134 } // namespace content |
| OLD | NEW |