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

Side by Side Diff: webkit/plugins/ppapi/ppapi_webplugin_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 | « webkit/plugins/ppapi/ppapi_unittest.cc ('k') | no next file » | 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 "webkit/plugins/ppapi/ppapi_webplugin_impl.h" 5 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 WebKit::WebPluginContainer* WebPluginImpl::container() const { 77 WebKit::WebPluginContainer* WebPluginImpl::container() const {
78 return container_; 78 return container_;
79 } 79 }
80 80
81 bool WebPluginImpl::initialize(WebPluginContainer* container) { 81 bool WebPluginImpl::initialize(WebPluginContainer* container) {
82 // The plugin delegate may have gone away. 82 // The plugin delegate may have gone away.
83 if (!init_data_->delegate) 83 if (!init_data_->delegate)
84 return false; 84 return false;
85 85
86 instance_ = init_data_->module->CreateInstance(init_data_->delegate); 86 instance_ = init_data_->module->CreateInstance(init_data_->delegate,
87 container,
88 init_data_->url);
87 if (!instance_) 89 if (!instance_)
88 return false; 90 return false;
89 91
90 bool success = instance_->Initialize(container, 92 bool success = instance_->Initialize(init_data_->arg_names,
91 init_data_->arg_names,
92 init_data_->arg_values, 93 init_data_->arg_values,
93 init_data_->url,
94 full_frame_); 94 full_frame_);
95 if (!success) { 95 if (!success) {
96 instance_->Delete(); 96 instance_->Delete();
97 instance_ = NULL; 97 instance_ = NULL;
98 98
99 WebKit::WebPlugin* replacement_plugin = 99 WebKit::WebPlugin* replacement_plugin =
100 init_data_->delegate->CreatePluginReplacement( 100 init_data_->delegate->CreatePluginReplacement(
101 init_data_->module->path()); 101 init_data_->module->path());
102 if (!replacement_plugin || !replacement_plugin->initialize(container)) 102 if (!replacement_plugin || !replacement_plugin->initialize(container))
103 return false; 103 return false;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 void WebPluginImpl::rotateView(RotationType type) { 293 void WebPluginImpl::rotateView(RotationType type) {
294 instance_->RotateView(type); 294 instance_->RotateView(type);
295 } 295 }
296 296
297 bool WebPluginImpl::isPlaceholder() { 297 bool WebPluginImpl::isPlaceholder() {
298 return false; 298 return false;
299 } 299 }
300 300
301 } // namespace ppapi 301 } // namespace ppapi
302 } // namespace webkit 302 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698