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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11316316: Implement an IsAllowed function in the pepper PPB_Broker_Trusted API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
« no previous file with comments | « content/public/browser/browser_ppapi_host.h ('k') | ppapi/api/trusted/ppb_broker_trusted.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/pepper/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "ppapi/proxy/ppapi_messages.h" 66 #include "ppapi/proxy/ppapi_messages.h"
67 #include "ppapi/shared_impl/file_path.h" 67 #include "ppapi/shared_impl/file_path.h"
68 #include "ppapi/shared_impl/platform_file.h" 68 #include "ppapi/shared_impl/platform_file.h"
69 #include "ppapi/shared_impl/ppapi_permissions.h" 69 #include "ppapi/shared_impl/ppapi_permissions.h"
70 #include "ppapi/shared_impl/ppapi_preferences.h" 70 #include "ppapi/shared_impl/ppapi_preferences.h"
71 #include "ppapi/shared_impl/ppb_device_ref_shared.h" 71 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
72 #include "ppapi/thunk/enter.h" 72 #include "ppapi/thunk/enter.h"
73 #include "ppapi/thunk/ppb_tcp_server_socket_private_api.h" 73 #include "ppapi/thunk/ppb_tcp_server_socket_private_api.h"
74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
81 #include "ui/gfx/size.h" 82 #include "ui/gfx/size.h"
82 #include "webkit/fileapi/file_system_callback_dispatcher.h" 83 #include "webkit/fileapi/file_system_callback_dispatcher.h"
83 #include "webkit/plugins/npapi/webplugin.h" 84 #include "webkit/plugins/npapi/webplugin.h"
84 #include "webkit/plugins/ppapi/plugin_module.h" 85 #include "webkit/plugins/ppapi/plugin_module.h"
85 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 86 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ppapi::proxy::HostDispatcher::SetForInstance(instance, dispatcher_.get()); 155 ppapi::proxy::HostDispatcher::SetForInstance(instance, dispatcher_.get());
155 156
156 RendererPpapiHostImpl* host = 157 RendererPpapiHostImpl* host =
157 RendererPpapiHostImpl::GetForPPInstance(instance); 158 RendererPpapiHostImpl::GetForPPInstance(instance);
158 // TODO(brettw) remove this null check when the old-style pepper-based 159 // TODO(brettw) remove this null check when the old-style pepper-based
159 // browser tag is removed from this file. Getting this notification should 160 // browser tag is removed from this file. Getting this notification should
160 // always give us an instance we can find in the map otherwise, but that 161 // always give us an instance we can find in the map otherwise, but that
161 // isn't true for browser tag support. 162 // isn't true for browser tag support.
162 if (host) { 163 if (host) {
163 RenderView* render_view = host->GetRenderViewForInstance(instance); 164 RenderView* render_view = host->GetRenderViewForInstance(instance);
165 webkit::ppapi::PluginInstance* plugin_instance =
166 host->GetPluginInstance(instance);
164 render_view->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance( 167 render_view->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance(
165 plugin_child_id_, 168 plugin_child_id_,
166 instance, 169 instance,
167 render_view->GetRoutingID(), 170 PepperRendererInstanceData(
171 0, // The render process id will be supplied in the browser.
172 render_view->GetRoutingID(),
173 plugin_instance->container()->element().document().url(),
174 plugin_instance->plugin_url()),
168 is_external_)); 175 is_external_));
169 } 176 }
170 } 177 }
171 virtual void RemoveInstance(PP_Instance instance) { 178 virtual void RemoveInstance(PP_Instance instance) {
172 ppapi::proxy::HostDispatcher::RemoveForInstance(instance); 179 ppapi::proxy::HostDispatcher::RemoveForInstance(instance);
173 180
174 RendererPpapiHostImpl* host = 181 RendererPpapiHostImpl* host =
175 RendererPpapiHostImpl::GetForPPInstance(instance); 182 RendererPpapiHostImpl::GetForPPInstance(instance);
176 // TODO(brettw) remove null check as described in AddInstance. 183 // TODO(brettw) remove null check as described in AddInstance.
177 if (host) { 184 if (host) {
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 RenderWidgetFullscreenPepper* container = 1747 RenderWidgetFullscreenPepper* container =
1741 static_cast<RenderWidgetFullscreenPepper*>( 1748 static_cast<RenderWidgetFullscreenPepper*>(
1742 instance->fullscreen_container()); 1749 instance->fullscreen_container());
1743 return container->mouse_lock_dispatcher(); 1750 return container->mouse_lock_dispatcher();
1744 } else { 1751 } else {
1745 return render_view_->mouse_lock_dispatcher(); 1752 return render_view_->mouse_lock_dispatcher();
1746 } 1753 }
1747 } 1754 }
1748 1755
1749 } // namespace content 1756 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/browser_ppapi_host.h ('k') | ppapi/api/trusted/ppb_broker_trusted.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698