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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 "mojo/converters/geometry/geometry_type_converters.h" | 118 #include "mojo/converters/geometry/geometry_type_converters.h" |
119 #include "net/base/url_util.h" | 119 #include "net/base/url_util.h" |
120 #include "net/http/http_cache.h" | 120 #include "net/http/http_cache.h" |
121 #include "net/http/http_transaction_factory.h" | 121 #include "net/http/http_transaction_factory.h" |
122 #include "net/url_request/url_request_context.h" | 122 #include "net/url_request/url_request_context.h" |
123 #include "net/url_request/url_request_context_getter.h" | 123 #include "net/url_request/url_request_context_getter.h" |
124 #include "skia/public/type_converters.h" | |
125 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 124 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
126 #include "third_party/skia/include/core/SkBitmap.h" | 125 #include "third_party/skia/include/core/SkBitmap.h" |
127 #include "ui/accessibility/ax_tree_combiner.h" | 126 #include "ui/accessibility/ax_tree_combiner.h" |
128 #include "ui/base/layout.h" | 127 #include "ui/base/layout.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" |
(...skipping 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4836 return view_->GetAllowOtherViews(); | 4835 return view_->GetAllowOtherViews(); |
4837 } | 4836 } |
4838 | 4837 |
4839 #endif | 4838 #endif |
4840 | 4839 |
4841 void WebContentsImpl::OnDidDownloadImage( | 4840 void WebContentsImpl::OnDidDownloadImage( |
4842 const ImageDownloadCallback& callback, | 4841 const ImageDownloadCallback& callback, |
4843 int id, | 4842 int id, |
4844 const GURL& image_url, | 4843 const GURL& image_url, |
4845 int32_t http_status_code, | 4844 int32_t http_status_code, |
4846 mojo::Array<skia::mojom::BitmapPtr> images, | 4845 mojo::Array<SkBitmap> images, |
4847 mojo::Array<mojo::SizePtr> original_image_sizes) { | 4846 mojo::Array<mojo::SizePtr> original_image_sizes) { |
4848 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); | 4847 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); |
4849 const std::vector<gfx::Size> sizes = | 4848 const std::vector<gfx::Size> sizes = |
4850 original_image_sizes.To<std::vector<gfx::Size>>(); | 4849 original_image_sizes.To<std::vector<gfx::Size>>(); |
4851 | 4850 |
4852 callback.Run(id, http_status_code, image_url, bitmaps, sizes); | 4851 callback.Run(id, http_status_code, image_url, bitmaps, sizes); |
4853 } | 4852 } |
4854 | 4853 |
4855 void WebContentsImpl::OnDialogClosed(int render_process_id, | 4854 void WebContentsImpl::OnDialogClosed(int render_process_id, |
4856 int render_frame_id, | 4855 int render_frame_id, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5061 for (RenderViewHost* render_view_host : render_view_host_set) | 5060 for (RenderViewHost* render_view_host : render_view_host_set) |
5062 render_view_host->OnWebkitPreferencesChanged(); | 5061 render_view_host->OnWebkitPreferencesChanged(); |
5063 } | 5062 } |
5064 | 5063 |
5065 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5064 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5066 JavaScriptDialogManager* dialog_manager) { | 5065 JavaScriptDialogManager* dialog_manager) { |
5067 dialog_manager_ = dialog_manager; | 5066 dialog_manager_ = dialog_manager; |
5068 } | 5067 } |
5069 | 5068 |
5070 } // namespace content | 5069 } // namespace content |
OLD | NEW |