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/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 if (orig_mime_type == content::kBrowserPluginMimeType) { | 491 if (orig_mime_type == content::kBrowserPluginMimeType) { |
492 WebDocument document = frame->document(); | 492 WebDocument document = frame->document(); |
493 const Extension* extension = | 493 const Extension* extension = |
494 GetExtensionByOrigin(document.securityOrigin()); | 494 GetExtensionByOrigin(document.securityOrigin()); |
495 if (extension) { | 495 if (extension) { |
496 const extensions::APIPermission::ID perms[] = { | 496 const extensions::APIPermission::ID perms[] = { |
497 extensions::APIPermission::kWebView, | 497 extensions::APIPermission::kWebView, |
498 extensions::APIPermission::kAdView | 498 extensions::APIPermission::kAdView |
499 }; | 499 }; |
500 for (size_t i = 0; i < arraysize(perms); ++i) { | 500 for (size_t i = 0; i < arraysize(perms); ++i) { |
501 if (extension->HasAPIPermission(perms[i])) | 501 if (extension->permissions_data()->HasAPIPermission(perms[i])) |
502 return false; | 502 return false; |
503 } | 503 } |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 ChromeViewHostMsg_GetPluginInfo_Output output; | 507 ChromeViewHostMsg_GetPluginInfo_Output output; |
508 #if defined(ENABLE_PLUGINS) | 508 #if defined(ENABLE_PLUGINS) |
509 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( | 509 render_frame->Send(new ChromeViewHostMsg_GetPluginInfo( |
510 render_frame->GetRoutingID(), GURL(params.url), | 510 render_frame->GetRoutingID(), GURL(params.url), |
511 frame->top()->document().url(), orig_mime_type, &output)); | 511 frame->top()->document().url(), orig_mime_type, &output)); |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1451 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1452 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); | 1452 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1453 } | 1453 } |
1454 | 1454 |
1455 blink::WebWorkerPermissionClientProxy* | 1455 blink::WebWorkerPermissionClientProxy* |
1456 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1456 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1457 content::RenderFrame* render_frame, | 1457 content::RenderFrame* render_frame, |
1458 blink::WebFrame* frame) { | 1458 blink::WebFrame* frame) { |
1459 return new WorkerPermissionClientProxy(render_frame, frame); | 1459 return new WorkerPermissionClientProxy(render_frame, frame); |
1460 } | 1460 } |
OLD | NEW |