| 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "content/browser/host_zoom_map_impl.h" | 39 #include "content/browser/host_zoom_map_impl.h" |
| 40 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 40 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 41 #include "content/browser/renderer_host/dip_util.h" | 41 #include "content/browser/renderer_host/dip_util.h" |
| 42 #include "content/browser/renderer_host/render_process_host_impl.h" | 42 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 43 #include "content/browser/renderer_host/render_view_host_delegate.h" | 43 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 44 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 44 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 45 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 45 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 46 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 46 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 47 #include "content/common/browser_plugin/browser_plugin_messages.h" | 47 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| 48 #include "content/common/content_switches_internal.h" | 48 #include "content/common/content_switches_internal.h" |
| 49 #include "content/common/drag_messages.h" | |
| 50 #include "content/common/frame_messages.h" | 49 #include "content/common/frame_messages.h" |
| 51 #include "content/common/input_messages.h" | 50 #include "content/common/input_messages.h" |
| 52 #include "content/common/inter_process_time_ticks_converter.h" | 51 #include "content/common/inter_process_time_ticks_converter.h" |
| 53 #include "content/common/render_message_filter.mojom.h" | 52 #include "content/common/render_message_filter.mojom.h" |
| 54 #include "content/common/renderer.mojom.h" | 53 #include "content/common/renderer.mojom.h" |
| 55 #include "content/common/site_isolation_policy.h" | 54 #include "content/common/site_isolation_policy.h" |
| 56 #include "content/common/speech_recognition_messages.h" | 55 #include "content/common/speech_recognition_messages.h" |
| 57 #include "content/common/swapped_out_messages.h" | 56 #include "content/common/swapped_out_messages.h" |
| 58 #include "content/common/view_messages.h" | 57 #include "content/common/view_messages.h" |
| 59 #include "content/public/browser/ax_event_notification_details.h" | 58 #include "content/public/browser/ax_event_notification_details.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 #include "url/url_constants.h" | 95 #include "url/url_constants.h" |
| 97 | 96 |
| 98 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
| 99 #include "ui/display/win/screen_win.h" | 98 #include "ui/display/win/screen_win.h" |
| 100 #include "ui/gfx/geometry/dip_util.h" | 99 #include "ui/gfx/geometry/dip_util.h" |
| 101 #include "ui/gfx/platform_font_win.h" | 100 #include "ui/gfx/platform_font_win.h" |
| 102 #endif | 101 #endif |
| 103 | 102 |
| 104 using base::TimeDelta; | 103 using base::TimeDelta; |
| 105 using blink::WebConsoleMessage; | 104 using blink::WebConsoleMessage; |
| 106 using blink::WebDragOperation; | |
| 107 using blink::WebInputEvent; | 105 using blink::WebInputEvent; |
| 108 using blink::WebMediaPlayerAction; | 106 using blink::WebMediaPlayerAction; |
| 109 using blink::WebPluginAction; | 107 using blink::WebPluginAction; |
| 110 | 108 |
| 111 namespace content { | 109 namespace content { |
| 112 namespace { | 110 namespace { |
| 113 | 111 |
| 114 void GetPlatformSpecificPrefs(RendererPreferences* prefs) { | 112 void GetPlatformSpecificPrefs(RendererPreferences* prefs) { |
| 115 #if defined(OS_WIN) | 113 #if defined(OS_WIN) |
| 116 NONCLIENTMETRICS_XP metrics = {0}; | 114 NONCLIENTMETRICS_XP metrics = {0}; |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 void RenderViewHostImpl::RenderProcessExited(RenderProcessHost* host, | 597 void RenderViewHostImpl::RenderProcessExited(RenderProcessHost* host, |
| 600 base::TerminationStatus status, | 598 base::TerminationStatus status, |
| 601 int exit_code) { | 599 int exit_code) { |
| 602 if (!GetWidget()->renderer_initialized()) | 600 if (!GetWidget()->renderer_initialized()) |
| 603 return; | 601 return; |
| 604 | 602 |
| 605 GetWidget()->RendererExited(status, exit_code); | 603 GetWidget()->RendererExited(status, exit_code); |
| 606 delegate_->RenderViewTerminated(this, status, exit_code); | 604 delegate_->RenderViewTerminated(this, status, exit_code); |
| 607 } | 605 } |
| 608 | 606 |
| 609 void RenderViewHostImpl::DragSourceEndedAt( | |
| 610 int client_x, int client_y, int screen_x, int screen_y, | |
| 611 WebDragOperation operation) { | |
| 612 Send(new DragMsg_SourceEnded(GetRoutingID(), | |
| 613 gfx::Point(client_x, client_y), | |
| 614 gfx::Point(screen_x, screen_y), | |
| 615 operation)); | |
| 616 } | |
| 617 | |
| 618 void RenderViewHostImpl::DragSourceSystemDragEnded() { | |
| 619 Send(new DragMsg_SourceSystemDragEnded(GetRoutingID())); | |
| 620 } | |
| 621 | |
| 622 bool RenderViewHostImpl::Send(IPC::Message* msg) { | 607 bool RenderViewHostImpl::Send(IPC::Message* msg) { |
| 623 return GetWidget()->Send(msg); | 608 return GetWidget()->Send(msg); |
| 624 } | 609 } |
| 625 | 610 |
| 626 RenderWidgetHostImpl* RenderViewHostImpl::GetWidget() const { | 611 RenderWidgetHostImpl* RenderViewHostImpl::GetWidget() const { |
| 627 return render_widget_host_.get(); | 612 return render_widget_host_.get(); |
| 628 } | 613 } |
| 629 | 614 |
| 630 RenderProcessHost* RenderViewHostImpl::GetProcess() const { | 615 RenderProcessHost* RenderViewHostImpl::GetProcess() const { |
| 631 return GetWidget()->GetProcess(); | 616 return GetWidget()->GetProcess(); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 } else { | 1075 } else { |
| 1091 render_view_ready_on_process_launch_ = true; | 1076 render_view_ready_on_process_launch_ = true; |
| 1092 } | 1077 } |
| 1093 } | 1078 } |
| 1094 | 1079 |
| 1095 void RenderViewHostImpl::RenderViewReady() { | 1080 void RenderViewHostImpl::RenderViewReady() { |
| 1096 delegate_->RenderViewReady(this); | 1081 delegate_->RenderViewReady(this); |
| 1097 } | 1082 } |
| 1098 | 1083 |
| 1099 } // namespace content | 1084 } // namespace content |
| OLD | NEW |