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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11365235: Add PPAPI permissions for file chooser, PDF, testing, video capture, and video decode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/plugin_module.h ('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_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 checked_for_plugin_pdf_interface_ = true; 1110 checked_for_plugin_pdf_interface_ = true;
1111 plugin_pdf_interface_ = 1111 plugin_pdf_interface_ =
1112 static_cast<const PPP_Pdf_1*>(module_->GetPluginInterface( 1112 static_cast<const PPP_Pdf_1*>(module_->GetPluginInterface(
1113 PPP_PDF_INTERFACE_1)); 1113 PPP_PDF_INTERFACE_1));
1114 } 1114 }
1115 1115
1116 return !!plugin_pdf_interface_; 1116 return !!plugin_pdf_interface_;
1117 } 1117 }
1118 1118
1119 bool PluginInstance::LoadPrintInterface() { 1119 bool PluginInstance::LoadPrintInterface() {
1120 // Only check for the interface if the plugin has dev permission.
1121 if (!module_->permissions().HasPermission(::ppapi::PERMISSION_DEV))
1122 return false;
1120 if (!plugin_print_interface_) { 1123 if (!plugin_print_interface_) {
1121 plugin_print_interface_ = static_cast<const PPP_Printing_Dev*>( 1124 plugin_print_interface_ = static_cast<const PPP_Printing_Dev*>(
1122 module_->GetPluginInterface(PPP_PRINTING_DEV_INTERFACE)); 1125 module_->GetPluginInterface(PPP_PRINTING_DEV_INTERFACE));
1123 } 1126 }
1124 return !!plugin_print_interface_; 1127 return !!plugin_print_interface_;
1125 } 1128 }
1126 1129
1127 bool PluginInstance::LoadPrivateInterface() { 1130 bool PluginInstance::LoadPrivateInterface() {
1128 if (!plugin_private_interface_) { 1131 if (!plugin_private_interface_) {
1129 plugin_private_interface_ = static_cast<const PPP_Instance_Private*>( 1132 plugin_private_interface_ = static_cast<const PPP_Instance_Private*>(
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 screen_size_for_fullscreen_ = gfx::Size(); 2478 screen_size_for_fullscreen_ = gfx::Size();
2476 WebElement element = container_->element(); 2479 WebElement element = container_->element();
2477 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2480 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2478 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2481 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2479 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2482 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2480 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2483 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2481 } 2484 }
2482 2485
2483 } // namespace ppapi 2486 } // namespace ppapi
2484 } // namespace webkit 2487 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698