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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 WebLocalFrame* frame, | 496 WebLocalFrame* frame, |
497 const WebPluginParams& params, | 497 const WebPluginParams& params, |
498 WebPlugin** plugin) { | 498 WebPlugin** plugin) { |
499 std::string orig_mime_type = params.mimeType.utf8(); | 499 std::string orig_mime_type = params.mimeType.utf8(); |
500 if (orig_mime_type == content::kBrowserPluginMimeType) { | 500 if (orig_mime_type == content::kBrowserPluginMimeType) { |
501 WebDocument document = frame->document(); | 501 WebDocument document = frame->document(); |
502 const Extension* extension = | 502 const Extension* extension = |
503 GetExtensionByOrigin(document.securityOrigin()); | 503 GetExtensionByOrigin(document.securityOrigin()); |
504 if (extension) { | 504 if (extension) { |
505 const extensions::APIPermission::ID perms[] = { | 505 const extensions::APIPermission::ID perms[] = { |
| 506 extensions::APIPermission::kAppView, |
506 extensions::APIPermission::kWebView, | 507 extensions::APIPermission::kWebView, |
507 }; | 508 }; |
508 for (size_t i = 0; i < arraysize(perms); ++i) { | 509 for (size_t i = 0; i < arraysize(perms); ++i) { |
509 if (extension->permissions_data()->HasAPIPermission(perms[i])) | 510 if (extension->permissions_data()->HasAPIPermission(perms[i])) |
510 return false; | 511 return false; |
511 } | 512 } |
512 } | 513 } |
513 } | 514 } |
514 | 515 |
515 ChromeViewHostMsg_GetPluginInfo_Output output; | 516 ChromeViewHostMsg_GetPluginInfo_Output output; |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1428 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1428 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); | 1429 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1429 } | 1430 } |
1430 | 1431 |
1431 blink::WebWorkerPermissionClientProxy* | 1432 blink::WebWorkerPermissionClientProxy* |
1432 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1433 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1433 content::RenderFrame* render_frame, | 1434 content::RenderFrame* render_frame, |
1434 blink::WebFrame* frame) { | 1435 blink::WebFrame* frame) { |
1435 return new WorkerPermissionClientProxy(render_frame, frame); | 1436 return new WorkerPermissionClientProxy(render_frame, frame); |
1436 } | 1437 } |
OLD | NEW |