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/gl/gl_switches.h" | 127 #include "ui/gl/gl_switches.h" |
129 | 128 |
130 #if defined(OS_ANDROID) | 129 #if defined(OS_ANDROID) |
131 #include "content/browser/android/content_video_view.h" | 130 #include "content/browser/android/content_video_view.h" |
132 #include "content/browser/android/date_time_chooser_android.h" | 131 #include "content/browser/android/date_time_chooser_android.h" |
133 #include "content/browser/media/android/media_web_contents_observer_android.h" | 132 #include "content/browser/media/android/media_web_contents_observer_android.h" |
(...skipping 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4839 return view_->GetAllowOtherViews(); | 4838 return view_->GetAllowOtherViews(); |
4840 } | 4839 } |
4841 | 4840 |
4842 #endif | 4841 #endif |
4843 | 4842 |
4844 void WebContentsImpl::OnDidDownloadImage( | 4843 void WebContentsImpl::OnDidDownloadImage( |
4845 const ImageDownloadCallback& callback, | 4844 const ImageDownloadCallback& callback, |
4846 int id, | 4845 int id, |
4847 const GURL& image_url, | 4846 const GURL& image_url, |
4848 int32_t http_status_code, | 4847 int32_t http_status_code, |
4849 mojo::Array<skia::mojom::BitmapPtr> images, | 4848 mojo::Array<SkBitmap> images, |
4850 mojo::Array<gfx::Size> original_image_sizes) { | 4849 mojo::Array<gfx::Size> original_image_sizes) { |
4851 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); | 4850 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); |
4852 | 4851 |
4853 callback.Run(id, http_status_code, image_url, bitmaps, | 4852 callback.Run(id, http_status_code, image_url, bitmaps, |
4854 original_image_sizes.PassStorage()); | 4853 original_image_sizes.PassStorage()); |
4855 } | 4854 } |
4856 | 4855 |
4857 void WebContentsImpl::OnDialogClosed(int render_process_id, | 4856 void WebContentsImpl::OnDialogClosed(int render_process_id, |
4858 int render_frame_id, | 4857 int render_frame_id, |
4859 IPC::Message* reply_msg, | 4858 IPC::Message* reply_msg, |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5063 for (RenderViewHost* render_view_host : render_view_host_set) | 5062 for (RenderViewHost* render_view_host : render_view_host_set) |
5064 render_view_host->OnWebkitPreferencesChanged(); | 5063 render_view_host->OnWebkitPreferencesChanged(); |
5065 } | 5064 } |
5066 | 5065 |
5067 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5066 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5068 JavaScriptDialogManager* dialog_manager) { | 5067 JavaScriptDialogManager* dialog_manager) { |
5069 dialog_manager_ = dialog_manager; | 5068 dialog_manager_ = dialog_manager; |
5070 } | 5069 } |
5071 | 5070 |
5072 } // namespace content | 5071 } // namespace content |
OLD | NEW |