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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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" | 123 #include "skia/public/type_converters.h" |
124 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 124 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
125 #include "third_party/skia/include/core/SkBitmap.h" | 125 #include "third_party/skia/include/core/SkBitmap.h" |
126 #include "ui/accessibility/ax_tree_combiner.h" | 126 #include "ui/accessibility/ax_tree_combiner.h" |
127 #include "ui/base/layout.h" | 127 #include "ui/base/layout.h" |
128 #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" |
134 #include "content/browser/media/android/media_web_contents_observer_android.h" | 133 #include "content/browser/media/android/media_web_contents_observer_android.h" |
135 #include "content/browser/web_contents/web_contents_android.h" | 134 #include "content/browser/web_contents/web_contents_android.h" |
136 #endif // OS_ANDROID | 135 #endif // OS_ANDROID |
137 | 136 |
138 #if defined(OS_MACOSX) | 137 #if defined(OS_MACOSX) |
(...skipping 4702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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<skia::mojom::BitmapPtr> images, |
4851 mojo::Array<mojo::SizePtr> original_image_sizes) { | 4850 mojo::Array<gfx::Size> 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 = | |
4854 original_image_sizes.To<std::vector<gfx::Size>>(); | |
4855 | 4852 |
4856 callback.Run(id, http_status_code, image_url, bitmaps, sizes); | 4853 callback.Run(id, http_status_code, image_url, bitmaps, |
| 4854 original_image_sizes.PassStorage()); |
4857 } | 4855 } |
4858 | 4856 |
4859 void WebContentsImpl::OnDialogClosed(int render_process_id, | 4857 void WebContentsImpl::OnDialogClosed(int render_process_id, |
4860 int render_frame_id, | 4858 int render_frame_id, |
4861 IPC::Message* reply_msg, | 4859 IPC::Message* reply_msg, |
4862 bool dialog_was_suppressed, | 4860 bool dialog_was_suppressed, |
4863 bool success, | 4861 bool success, |
4864 const base::string16& user_input) { | 4862 const base::string16& user_input) { |
4865 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, | 4863 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, |
4866 render_frame_id); | 4864 render_frame_id); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5065 for (RenderViewHost* render_view_host : render_view_host_set) | 5063 for (RenderViewHost* render_view_host : render_view_host_set) |
5066 render_view_host->OnWebkitPreferencesChanged(); | 5064 render_view_host->OnWebkitPreferencesChanged(); |
5067 } | 5065 } |
5068 | 5066 |
5069 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5067 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5070 JavaScriptDialogManager* dialog_manager) { | 5068 JavaScriptDialogManager* dialog_manager) { |
5071 dialog_manager_ = dialog_manager; | 5069 dialog_manager_ = dialog_manager; |
5072 } | 5070 } |
5073 | 5071 |
5074 } // namespace content | 5072 } // namespace content |
OLD | NEW |