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

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

Issue 9045007: Allow plugins to participate in Chrome context menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 12 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" 99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h"
100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" 100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h" 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h"
103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo. h" 103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo. h"
104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h" 104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h"
105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" 105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h"
106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" 106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h"
107 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" 107 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
108 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginAction.h"
108 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" 109 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
109 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" 110 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h"
110 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 111 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
111 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" 112 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
112 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" 113 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
113 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData .h" 114 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData .h"
114 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 115 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
115 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 116 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
116 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" 117 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h"
117 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h " 118 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h "
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 using WebKit::WebInputElement; 201 using WebKit::WebInputElement;
201 using WebKit::WebMediaPlayer; 202 using WebKit::WebMediaPlayer;
202 using WebKit::WebMediaPlayerAction; 203 using WebKit::WebMediaPlayerAction;
203 using WebKit::WebMediaPlayerClient; 204 using WebKit::WebMediaPlayerClient;
204 using WebKit::WebNavigationPolicy; 205 using WebKit::WebNavigationPolicy;
205 using WebKit::WebNavigationType; 206 using WebKit::WebNavigationType;
206 using WebKit::WebNode; 207 using WebKit::WebNode;
207 using WebKit::WebPageSerializer; 208 using WebKit::WebPageSerializer;
208 using WebKit::WebPageSerializerClient; 209 using WebKit::WebPageSerializerClient;
209 using WebKit::WebPlugin; 210 using WebKit::WebPlugin;
211 using WebKit::WebPluginAction;
210 using WebKit::WebPluginContainer; 212 using WebKit::WebPluginContainer;
211 using WebKit::WebPluginDocument; 213 using WebKit::WebPluginDocument;
212 using WebKit::WebPluginParams; 214 using WebKit::WebPluginParams;
213 using WebKit::WebPoint; 215 using WebKit::WebPoint;
214 using WebKit::WebPopupMenuInfo; 216 using WebKit::WebPopupMenuInfo;
215 using WebKit::WebRange; 217 using WebKit::WebRange;
216 using WebKit::WebRect; 218 using WebKit::WebRect;
217 using WebKit::WebReferrerPolicy; 219 using WebKit::WebReferrerPolicy;
218 using WebKit::WebScriptSource; 220 using WebKit::WebScriptSource;
219 using WebKit::WebSearchableFormData; 221 using WebKit::WebSearchableFormData;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) 663 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
662 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) 664 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode)
663 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) 665 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground)
664 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, 666 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode,
665 OnEnablePreferredSizeChangedMode) 667 OnEnablePreferredSizeChangedMode)
666 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) 668 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize)
667 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, 669 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows,
668 OnDisableScrollbarsForSmallWindows) 670 OnDisableScrollbarsForSmallWindows)
669 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) 671 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
670 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) 672 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt)
673 IPC_MESSAGE_HANDLER(ViewMsg_PluginAction, OnPluginAction)
671 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) 674 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive)
672 #if defined(OS_MACOSX) 675 #if defined(OS_MACOSX)
673 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility) 676 IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility)
674 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged) 677 IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged)
675 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted, 678 IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionCompleted,
676 OnPluginImeCompositionCompleted) 679 OnPluginImeCompositionCompleted)
677 #endif 680 #endif
678 IPC_MESSAGE_HANDLER(ViewMsg_SetEditCommandsForNextKeyEvent, 681 IPC_MESSAGE_HANDLER(ViewMsg_SetEditCommandsForNextKeyEvent,
679 OnSetEditCommandsForNextKeyEvent) 682 OnSetEditCommandsForNextKeyEvent)
680 IPC_MESSAGE_HANDLER(ViewMsg_CustomContextMenuAction, 683 IPC_MESSAGE_HANDLER(ViewMsg_CustomContextMenuAction,
(...skipping 3279 matching lines...) Expand 10 before | Expand all | Expand 10 after
3960 zoomLevelChanged(); 3963 zoomLevelChanged();
3961 } 3964 }
3962 } 3965 }
3963 3966
3964 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, 3967 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location,
3965 const WebMediaPlayerAction& action) { 3968 const WebMediaPlayerAction& action) {
3966 if (webview()) 3969 if (webview())
3967 webview()->performMediaPlayerAction(action, location); 3970 webview()->performMediaPlayerAction(action, location);
3968 } 3971 }
3969 3972
3973 void RenderViewImpl::OnPluginAction(const WebPluginAction& action) {
3974 if (webview())
3975 webview()->performPluginAction(action);
3976 }
3977
3970 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( 3978 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage(
3971 const GURL& page_url) { 3979 const GURL& page_url) {
3972 // Prepare list to storage all savable resource links. 3980 // Prepare list to storage all savable resource links.
3973 std::vector<GURL> resources_list; 3981 std::vector<GURL> resources_list;
3974 std::vector<GURL> referrers_list; 3982 std::vector<GURL> referrers_list;
3975 std::vector<GURL> frames_list; 3983 std::vector<GURL> frames_list;
3976 webkit_glue::SavableResourcesResult result(&resources_list, 3984 webkit_glue::SavableResourcesResult result(&resources_list,
3977 &referrers_list, 3985 &referrers_list,
3978 &frames_list); 3986 &frames_list);
3979 3987
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
4803 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 4811 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
4804 return !!RenderThreadImpl::current()->compositor_thread(); 4812 return !!RenderThreadImpl::current()->compositor_thread();
4805 } 4813 }
4806 4814
4807 void RenderViewImpl::OnJavaBridgeInit() { 4815 void RenderViewImpl::OnJavaBridgeInit() {
4808 DCHECK(!java_bridge_dispatcher_.get()); 4816 DCHECK(!java_bridge_dispatcher_.get());
4809 #if defined(ENABLE_JAVA_BRIDGE) 4817 #if defined(ENABLE_JAVA_BRIDGE)
4810 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 4818 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
4811 #endif 4819 #endif
4812 } 4820 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698