Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2008193002: Change mojo geometry structs from using type converters to StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
108 #include "content/public/common/child_process_host.h" 108 #include "content/public/common/child_process_host.h"
109 #include "content/public/common/content_constants.h" 109 #include "content/public/common/content_constants.h"
110 #include "content/public/common/content_switches.h" 110 #include "content/public/common/content_switches.h"
111 #include "content/public/common/page_zoom.h" 111 #include "content/public/common/page_zoom.h"
112 #include "content/public/common/result_codes.h" 112 #include "content/public/common/result_codes.h"
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 "mojo/converters/geometry/geometry_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 "skia/public/type_converters.h" 123 #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"
(...skipping 4706 matching lines...) Expand 10 before | Expand all | Expand 10 after
4835 } 4834 }
4836 4835
4837 #endif 4836 #endif
4838 4837
4839 void WebContentsImpl::OnDidDownloadImage( 4838 void WebContentsImpl::OnDidDownloadImage(
4840 const ImageDownloadCallback& callback, 4839 const ImageDownloadCallback& callback,
4841 int id, 4840 int id,
4842 const GURL& image_url, 4841 const GURL& image_url,
4843 int32_t http_status_code, 4842 int32_t http_status_code,
4844 mojo::Array<skia::mojom::BitmapPtr> images, 4843 mojo::Array<skia::mojom::BitmapPtr> images,
4845 mojo::Array<mojo::SizePtr> original_image_sizes) { 4844 mojo::Array<gfx::Size> original_image_sizes) {
4846 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>(); 4845 const std::vector<SkBitmap> bitmaps = images.To<std::vector<SkBitmap>>();
4847 const std::vector<gfx::Size> sizes =
4848 original_image_sizes.To<std::vector<gfx::Size>>();
4849 4846
4850 callback.Run(id, http_status_code, image_url, bitmaps, sizes); 4847 callback.Run(id, http_status_code, image_url, bitmaps,
4848 original_image_sizes.PassStorage());
4851 } 4849 }
4852 4850
4853 void WebContentsImpl::OnDialogClosed(int render_process_id, 4851 void WebContentsImpl::OnDialogClosed(int render_process_id,
4854 int render_frame_id, 4852 int render_frame_id,
4855 IPC::Message* reply_msg, 4853 IPC::Message* reply_msg,
4856 bool dialog_was_suppressed, 4854 bool dialog_was_suppressed,
4857 bool success, 4855 bool success,
4858 const base::string16& user_input) { 4856 const base::string16& user_input) {
4859 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, 4857 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id,
4860 render_frame_id); 4858 render_frame_id);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
5059 for (RenderViewHost* render_view_host : render_view_host_set) 5057 for (RenderViewHost* render_view_host : render_view_host_set)
5060 render_view_host->OnWebkitPreferencesChanged(); 5058 render_view_host->OnWebkitPreferencesChanged();
5061 } 5059 }
5062 5060
5063 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5061 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5064 JavaScriptDialogManager* dialog_manager) { 5062 JavaScriptDialogManager* dialog_manager) {
5065 dialog_manager_ = dialog_manager; 5063 dialog_manager_ = dialog_manager;
5066 } 5064 }
5067 5065
5068 } // namespace content 5066 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698