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 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h" | 103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h" |
104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.
h" | 104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.
h" |
105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" | 106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" |
107 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" | 107 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" |
108 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 108 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 109 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginAction.h" |
109 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 110 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
110 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" | 111 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" |
111 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" | 112 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" |
112 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" | 113 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
113 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 114 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
114 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData
.h" | 115 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData
.h" |
115 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 116 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
116 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 117 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
117 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 118 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
118 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" | 119 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 using WebKit::WebInputElement; | 202 using WebKit::WebInputElement; |
202 using WebKit::WebMediaPlayer; | 203 using WebKit::WebMediaPlayer; |
203 using WebKit::WebMediaPlayerAction; | 204 using WebKit::WebMediaPlayerAction; |
204 using WebKit::WebMediaPlayerClient; | 205 using WebKit::WebMediaPlayerClient; |
205 using WebKit::WebNavigationPolicy; | 206 using WebKit::WebNavigationPolicy; |
206 using WebKit::WebNavigationType; | 207 using WebKit::WebNavigationType; |
207 using WebKit::WebNode; | 208 using WebKit::WebNode; |
208 using WebKit::WebPageSerializer; | 209 using WebKit::WebPageSerializer; |
209 using WebKit::WebPageSerializerClient; | 210 using WebKit::WebPageSerializerClient; |
210 using WebKit::WebPlugin; | 211 using WebKit::WebPlugin; |
| 212 using WebKit::WebPluginAction; |
211 using WebKit::WebPluginContainer; | 213 using WebKit::WebPluginContainer; |
212 using WebKit::WebPluginDocument; | 214 using WebKit::WebPluginDocument; |
213 using WebKit::WebPluginParams; | 215 using WebKit::WebPluginParams; |
214 using WebKit::WebPoint; | 216 using WebKit::WebPoint; |
215 using WebKit::WebPopupMenuInfo; | 217 using WebKit::WebPopupMenuInfo; |
216 using WebKit::WebRange; | 218 using WebKit::WebRange; |
217 using WebKit::WebRect; | 219 using WebKit::WebRect; |
218 using WebKit::WebReferrerPolicy; | 220 using WebKit::WebReferrerPolicy; |
219 using WebKit::WebScriptSource; | 221 using WebKit::WebScriptSource; |
220 using WebKit::WebSearchableFormData; | 222 using WebKit::WebSearchableFormData; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) | 657 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) |
656 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) | 658 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) |
657 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) | 659 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) |
658 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, | 660 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, |
659 OnEnablePreferredSizeChangedMode) | 661 OnEnablePreferredSizeChangedMode) |
660 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) | 662 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) |
661 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, | 663 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, |
662 OnDisableScrollbarsForSmallWindows) | 664 OnDisableScrollbarsForSmallWindows) |
663 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) | 665 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) |
664 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) | 666 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) |
| 667 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) |
665 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) | 668 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) |
666 #if defined(OS_MACOSX) | 669 #if defined(OS_MACOSX) |
667 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) | 670 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) |
668 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) | 671 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) |
669 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, | 672 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, |
670 OnPluginImeCompositionCompleted) | 673 OnPluginImeCompositionCompleted) |
671 #endif | 674 #endif |
672 IPC_MESSAGE_HANDLER(ViewMsg_SetEditCommandsForNextKeyEvent, | 675 IPC_MESSAGE_HANDLER(ViewMsg_SetEditCommandsForNextKeyEvent, |
673 OnSetEditCommandsForNextKeyEvent) | 676 OnSetEditCommandsForNextKeyEvent) |
674 IPC_MESSAGE_HANDLER(ViewMsg_CustomContextMenuAction, | 677 IPC_MESSAGE_HANDLER(ViewMsg_CustomContextMenuAction, |
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3972 zoomLevelChanged(); | 3975 zoomLevelChanged(); |
3973 } | 3976 } |
3974 } | 3977 } |
3975 | 3978 |
3976 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, | 3979 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, |
3977 const WebMediaPlayerAction& action) { | 3980 const WebMediaPlayerAction& action) { |
3978 if (webview()) | 3981 if (webview()) |
3979 webview()->performMediaPlayerAction(action, location); | 3982 webview()->performMediaPlayerAction(action, location); |
3980 } | 3983 } |
3981 | 3984 |
| 3985 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, |
| 3986 const WebPluginAction& action) { |
| 3987 if (webview()) |
| 3988 webview()->performPluginAction(action, location); |
| 3989 } |
| 3990 |
3982 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( | 3991 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( |
3983 const GURL& page_url) { | 3992 const GURL& page_url) { |
3984 // Prepare list to storage all savable resource links. | 3993 // Prepare list to storage all savable resource links. |
3985 std::vector<GURL> resources_list; | 3994 std::vector<GURL> resources_list; |
3986 std::vector<GURL> referrers_list; | 3995 std::vector<GURL> referrers_list; |
3987 std::vector<GURL> frames_list; | 3996 std::vector<GURL> frames_list; |
3988 webkit_glue::SavableResourcesResult result(&resources_list, | 3997 webkit_glue::SavableResourcesResult result(&resources_list, |
3989 &referrers_list, | 3998 &referrers_list, |
3990 &frames_list); | 3999 &frames_list); |
3991 | 4000 |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4821 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4830 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
4822 return !!RenderThreadImpl::current()->compositor_thread(); | 4831 return !!RenderThreadImpl::current()->compositor_thread(); |
4823 } | 4832 } |
4824 | 4833 |
4825 void RenderViewImpl::OnJavaBridgeInit() { | 4834 void RenderViewImpl::OnJavaBridgeInit() { |
4826 DCHECK(!java_bridge_dispatcher_.get()); | 4835 DCHECK(!java_bridge_dispatcher_.get()); |
4827 #if defined(ENABLE_JAVA_BRIDGE) | 4836 #if defined(ENABLE_JAVA_BRIDGE) |
4828 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4837 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
4829 #endif | 4838 #endif |
4830 } | 4839 } |
OLD | NEW |