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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 353013007: Implement <appview> skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_view_skeleton
Patch Set: Created 6 years, 6 months 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
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 "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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698