| 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/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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 175 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
| 175 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 176 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| 176 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" | 177 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa
lue.h" |
| 177 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 178 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
| 178 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" | 179 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" |
| 179 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" | 180 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" |
| 180 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 181 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 181 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 182 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| 182 #include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderThem
e.h" | 183 #include "third_party/WebKit/Source/WebKit/chromium/public/default/WebRenderThem
e.h" |
| 183 #include "third_party/skia/include/core/SkBitmap.h" | 184 #include "third_party/skia/include/core/SkBitmap.h" |
| 185 #include "third_party/skia/include/core/SkPicture.h" |
| 184 #include "ui/base/ui_base_switches.h" | 186 #include "ui/base/ui_base_switches.h" |
| 185 #include "ui/gfx/native_widget_types.h" | 187 #include "ui/gfx/native_widget_types.h" |
| 186 #include "ui/gfx/point.h" | 188 #include "ui/gfx/point.h" |
| 187 #include "ui/gfx/rect.h" | 189 #include "ui/gfx/rect.h" |
| 188 #include "ui/gfx/rect_conversions.h" | 190 #include "ui/gfx/rect_conversions.h" |
| 189 #include "ui/gfx/size_conversions.h" | 191 #include "ui/gfx/size_conversions.h" |
| 190 #include "ui/shell_dialogs/selected_file_info.h" | 192 #include "ui/shell_dialogs/selected_file_info.h" |
| 191 #include "v8/include/v8.h" | 193 #include "v8/include/v8.h" |
| 192 #include "webkit/appcache/web_application_cache_host_impl.h" | 194 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 193 #include "webkit/base/file_path_string_conversions.h" | 195 #include "webkit/base/file_path_string_conversions.h" |
| (...skipping 6415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6609 | 6611 |
| 6610 gfx::Rect physical_window_zoom_rect = gfx::ToEnclosingRect( | 6612 gfx::Rect physical_window_zoom_rect = gfx::ToEnclosingRect( |
| 6611 ClientRectToPhysicalWindowRect(gfx::RectF(zoom_rect))); | 6613 ClientRectToPhysicalWindowRect(gfx::RectF(zoom_rect))); |
| 6612 Send(new ViewHostMsg_ShowDisambiguationPopup(routing_id_, | 6614 Send(new ViewHostMsg_ShowDisambiguationPopup(routing_id_, |
| 6613 physical_window_zoom_rect, | 6615 physical_window_zoom_rect, |
| 6614 canvas_size, | 6616 canvas_size, |
| 6615 transport_dib->id())); | 6617 transport_dib->id())); |
| 6616 | 6618 |
| 6617 return true; | 6619 return true; |
| 6618 } | 6620 } |
| 6621 |
| 6622 skia::RefPtr<SkPicture> RenderViewImpl::CapturePicture() { |
| 6623 return compositor_ ? compositor_->layer_tree_host()->capturePicture() : |
| 6624 skia::RefPtr<SkPicture>(); |
| 6625 } |
| 6619 #endif | 6626 #endif |
| 6620 | 6627 |
| 6621 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6628 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6622 TransportDIB::Handle dib_handle) { | 6629 TransportDIB::Handle dib_handle) { |
| 6623 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6630 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6624 RenderProcess::current()->ReleaseTransportDIB(dib); | 6631 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6625 } | 6632 } |
| 6626 | 6633 |
| 6634 void RenderViewImpl::DidCommitCompositorFrame() { |
| 6635 RenderWidget::DidCommitCompositorFrame(); |
| 6636 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
| 6637 } |
| 6638 |
| 6627 } // namespace content | 6639 } // namespace content |
| OLD | NEW |