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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 11861008: Expose the capturePicture feature in RenderView for Android WebView legacy API support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix for non-Android platforms. Created 7 years, 10 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 | Annotate | Revision Log
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/debug/trace_event.h" 14 #include "base/debug/trace_event.h"
15 #include "base/json/json_reader.h" 15 #include "base/json/json_reader.h"
16 #include "base/json/json_writer.h" 16 #include "base/json/json_writer.h"
17 #include "base/lazy_instance.h" 17 #include "base/lazy_instance.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/message_loop_proxy.h" 19 #include "base/message_loop_proxy.h"
20 #include "base/metrics/histogram.h" 20 #include "base/metrics/histogram.h"
21 #include "base/path_service.h" 21 #include "base/path_service.h"
22 #include "base/process_util.h" 22 #include "base/process_util.h"
23 #include "base/string_number_conversions.h" 23 #include "base/string_number_conversions.h"
24 #include "base/string_piece.h" 24 #include "base/string_piece.h"
25 #include "base/string_split.h" 25 #include "base/string_split.h"
26 #include "base/string_util.h" 26 #include "base/string_util.h"
27 #include "base/sys_string_conversions.h" 27 #include "base/sys_string_conversions.h"
28 #include "base/time.h" 28 #include "base/time.h"
29 #include "base/utf_string_conversions.h" 29 #include "base/utf_string_conversions.h"
30 #include "cc/layer_tree_host.h"
30 #include "cc/output_surface.h" 31 #include "cc/output_surface.h"
31 #include "cc/switches.h" 32 #include "cc/switches.h"
32 #include "content/common/appcache/appcache_dispatcher.h" 33 #include "content/common/appcache/appcache_dispatcher.h"
33 #include "content/common/child_thread.h" 34 #include "content/common/child_thread.h"
34 #include "content/common/clipboard_messages.h" 35 #include "content/common/clipboard_messages.h"
35 #include "content/common/content_constants_internal.h" 36 #include "content/common/content_constants_internal.h"
36 #include "content/common/database_messages.h" 37 #include "content/common/database_messages.h"
37 #include "content/common/drag_messages.h" 38 #include "content/common/drag_messages.h"
38 #include "content/common/fileapi/file_system_dispatcher.h" 39 #include "content/common/fileapi/file_system_dispatcher.h"
39 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" 40 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 180 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
180 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 181 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
181 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa lue.h" 182 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa lue.h"
182 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" 183 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h"
183 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h" 184 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h"
184 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" 185 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h"
185 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 186 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
186 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" 187 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
187 #include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderThem e.h" 188 #include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderThem e.h"
188 #include "third_party/skia/include/core/SkBitmap.h" 189 #include "third_party/skia/include/core/SkBitmap.h"
190 #include "third_party/skia/include/core/SkPicture.h"
189 #include "ui/base/ui_base_switches.h" 191 #include "ui/base/ui_base_switches.h"
190 #include "ui/gfx/native_widget_types.h" 192 #include "ui/gfx/native_widget_types.h"
191 #include "ui/gfx/point.h" 193 #include "ui/gfx/point.h"
192 #include "ui/gfx/rect.h" 194 #include "ui/gfx/rect.h"
193 #include "ui/gfx/rect_conversions.h" 195 #include "ui/gfx/rect_conversions.h"
194 #include "ui/gfx/size_conversions.h" 196 #include "ui/gfx/size_conversions.h"
195 #include "ui/shell_dialogs/selected_file_info.h" 197 #include "ui/shell_dialogs/selected_file_info.h"
196 #include "v8/include/v8.h" 198 #include "v8/include/v8.h"
197 #include "webkit/appcache/web_application_cache_host_impl.h" 199 #include "webkit/appcache/web_application_cache_host_impl.h"
198 #include "webkit/base/file_path_string_conversions.h" 200 #include "webkit/base/file_path_string_conversions.h"
(...skipping 6453 matching lines...) Expand 10 before | Expand all | Expand 10 after
6652 6654
6653 gfx::Rect physical_window_zoom_rect = gfx::ToEnclosingRect( 6655 gfx::Rect physical_window_zoom_rect = gfx::ToEnclosingRect(
6654 ClientRectToPhysicalWindowRect(gfx::RectF(zoom_rect))); 6656 ClientRectToPhysicalWindowRect(gfx::RectF(zoom_rect)));
6655 Send(new ViewHostMsg_ShowDisambiguationPopup(routing_id_, 6657 Send(new ViewHostMsg_ShowDisambiguationPopup(routing_id_,
6656 physical_window_zoom_rect, 6658 physical_window_zoom_rect,
6657 canvas_size, 6659 canvas_size,
6658 transport_dib->id())); 6660 transport_dib->id()));
6659 6661
6660 return true; 6662 return true;
6661 } 6663 }
6664
6665 skia::RefPtr<SkPicture> RenderViewImpl::CapturePicture() {
6666 return compositor_ ? compositor_->layer_tree_host()->capturePicture() :
6667 skia::RefPtr<SkPicture>();
6668 }
6662 #endif 6669 #endif
6663 6670
6664 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6671 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6665 TransportDIB::Handle dib_handle) { 6672 TransportDIB::Handle dib_handle) {
6666 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6673 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6667 RenderProcess::current()->ReleaseTransportDIB(dib); 6674 RenderProcess::current()->ReleaseTransportDIB(dib);
6668 } 6675 }
6669 6676
6677 void RenderViewImpl::didCommitCompositorFrame() {
6678 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6679 }
6680
6670 } // namespace content 6681 } // namespace content
OLDNEW
« content/renderer/render_view_impl.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698