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/security_style.h" | 113 #include "content/public/common/security_style.h" |
114 #include "content/public/common/url_constants.h" | 114 #include "content/public/common/url_constants.h" |
115 #include "content/public/common/url_utils.h" | 115 #include "content/public/common/url_utils.h" |
116 #include "content/public/common/web_preferences.h" | 116 #include "content/public/common/web_preferences.h" |
117 #include "mojo/common/url_type_converters.h" | 117 #include "mojo/common/url_type_converters.h" |
118 #include "net/base/url_util.h" | 118 #include "net/base/url_util.h" |
119 #include "net/http/http_cache.h" | 119 #include "net/http/http_cache.h" |
120 #include "net/http/http_transaction_factory.h" | 120 #include "net/http/http_transaction_factory.h" |
121 #include "net/url_request/url_request_context.h" | 121 #include "net/url_request/url_request_context.h" |
122 #include "net/url_request/url_request_context_getter.h" | 122 #include "net/url_request/url_request_context_getter.h" |
123 #include "skia/public/type_converters.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/gfx/geometry/mojo/geometry_type_converters.h" | 127 #include "ui/gfx/geometry/mojo/geometry_type_converters.h" |
129 #include "ui/gl/gl_switches.h" | 128 #include "ui/gl/gl_switches.h" |
130 | 129 |
131 #if defined(OS_ANDROID) | 130 #if defined(OS_ANDROID) |
132 #include "content/browser/android/content_video_view.h" | 131 #include "content/browser/android/content_video_view.h" |
133 #include "content/browser/android/date_time_chooser_android.h" | 132 #include "content/browser/android/date_time_chooser_android.h" |
(...skipping 4706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4840 return view_->GetAllowOtherViews(); | 4839 return view_->GetAllowOtherViews(); |
4841 } | 4840 } |
4842 | 4841 |
4843 #endif | 4842 #endif |
4844 | 4843 |
4845 void WebContentsImpl::OnDidDownloadImage( | 4844 void WebContentsImpl::OnDidDownloadImage( |
4846 const ImageDownloadCallback& callback, | 4845 const ImageDownloadCallback& callback, |
4847 int id, | 4846 int id, |
4848 const GURL& image_url, | 4847 const GURL& image_url, |
4849 int32_t http_status_code, | 4848 int32_t http_status_code, |
4850 mojo::Array<skia::mojom::BitmapPtr> images, | 4849 mojo::Array<SkBitmap> images, |
4851 mojo::Array<mojo::SizePtr> original_image_sizes) { | 4850 mojo::Array<mojo::SizePtr> original_image_sizes) { |
4852 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); | 4851 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); |
4853 const std::vector<gfx::Size> sizes = | 4852 const std::vector<gfx::Size> sizes = |
4854 original_image_sizes.To<std::vector<gfx::Size>>(); | 4853 original_image_sizes.To<std::vector<gfx::Size>>(); |
4855 | 4854 |
4856 callback.Run(id, http_status_code, image_url, bitmaps, sizes); | 4855 callback.Run(id, http_status_code, image_url, bitmaps, sizes); |
4857 } | 4856 } |
4858 | 4857 |
4859 void WebContentsImpl::OnDialogClosed(int render_process_id, | 4858 void WebContentsImpl::OnDialogClosed(int render_process_id, |
4860 int render_frame_id, | 4859 int render_frame_id, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5065 for (RenderViewHost* render_view_host : render_view_host_set) | 5064 for (RenderViewHost* render_view_host : render_view_host_set) |
5066 render_view_host->OnWebkitPreferencesChanged(); | 5065 render_view_host->OnWebkitPreferencesChanged(); |
5067 } | 5066 } |
5068 | 5067 |
5069 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5068 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5070 JavaScriptDialogManager* dialog_manager) { | 5069 JavaScriptDialogManager* dialog_manager) { |
5071 dialog_manager_ = dialog_manager; | 5070 dialog_manager_ = dialog_manager; |
5072 } | 5071 } |
5073 | 5072 |
5074 } // namespace content | 5073 } // namespace content |
OLD | NEW |