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

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

Issue 11233065: Rename <browser> shim to <webview> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT. No longer exposed to Extensions 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
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_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 WebSecurityOrigin origin = document.securityOrigin(); 487 WebSecurityOrigin origin = document.securityOrigin();
488 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) 488 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme))
489 return true; 489 return true;
490 490
491 if (const extensions::Extension* extension = GetExtension(origin)) { 491 if (const extensions::Extension* extension = GetExtension(origin)) {
492 // Titlebars in app windows are implmented via Shadow DOM. 492 // Titlebars in app windows are implmented via Shadow DOM.
493 if (extension->HasAPIPermission(APIPermission::kAppWindow)) 493 if (extension->HasAPIPermission(APIPermission::kAppWindow))
494 return true; 494 return true;
495 495
496 // The <browser> tag is implemented via Shadow DOM. 496 // The <webview> tag is implemented via Shadow DOM.
497 if (extension->HasAPIPermission(APIPermission::kBrowserTag)) 497 if (extension->HasAPIPermission(APIPermission::kWebView))
498 return true; 498 return true;
499 499
500 if (extension->HasAPIPermission(APIPermission::kExperimental)) 500 if (extension->HasAPIPermission(APIPermission::kExperimental))
501 return true; 501 return true;
502 } else { 502 } else {
503 // When a packaged app opens a window with a sandboxed resource, the origin 503 // When a packaged app opens a window with a sandboxed resource, the origin
504 // will be unique (i.e. the empty string), so the fact that it is a shell 504 // will be unique (i.e. the empty string), so the fact that it is a shell
505 // window must be deduced from the view type instead to enable web 505 // window must be deduced from the view type instead to enable web
506 // components for HTML titlebars. 506 // components for HTML titlebars.
507 extensions::ExtensionHelper* helper = 507 extensions::ExtensionHelper* helper =
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 reinterpret_cast<const unsigned char*>(&data[0]); 982 reinterpret_cast<const unsigned char*>(&data[0]);
983 983
984 return decoder.Decode(src_data, data.size()); 984 return decoder.Decode(src_data, data.size());
985 } 985 }
986 return SkBitmap(); 986 return SkBitmap();
987 } 987 }
988 988
989 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { 989 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) {
990 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); 990 return (strict_security_hosts_.find(host) != strict_security_hosts_.end());
991 } 991 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/permissions/permission_set_unittest.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698