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

Unified Diff: chrome/renderer/resources/extensions/app_view_deny.js

Issue 353013007: Implement <appview> skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_view_skeleton
Patch Set: Fixed PermissionsTest unit test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/resources/extensions/app_view.js ('k') | chrome/renderer/resources/extensions/web_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/app_view_deny.js
diff --git a/chrome/renderer/resources/extensions/web_view_deny.js b/chrome/renderer/resources/extensions/app_view_deny.js
similarity index 61%
copy from chrome/renderer/resources/extensions/web_view_deny.js
copy to chrome/renderer/resources/extensions/app_view_deny.js
index 5c86ec92f105c8f1ca8d22bf79f62206bc96bd50..c228694d2bcaf89e2186d2b75ae69912793b2367 100644
--- a/chrome/renderer/resources/extensions/web_view_deny.js
+++ b/chrome/renderer/resources/extensions/app_view_deny.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,25 +6,26 @@ var DocumentNatives = requireNative('document_natives');
// Output error message to console when using the <webview> tag with no
// permission.
-var errorMessage = "You do not have permission to use the webview element." +
- " Be sure to declare the 'webview' permission in your manifest file.";
+var errorMessage = "You do not have permission to use the appview element." +
+ " Be sure to declare the 'appview' permission in your manifest file and use" +
+ " the --enable-app-view command line flag.";
// Registers <webview> custom element.
-function registerWebViewElement() {
+function registerAppViewElement() {
var proto = Object.create(HTMLElement.prototype);
proto.createdCallback = function() {
- console.error(errorMessage);
+ window.console.error(errorMessage);
};
- window.WebView =
- DocumentNatives.RegisterElement('webview', {prototype: proto});
+ window.AppView =
+ DocumentNatives.RegisterElement('appview', {prototype: proto});
// Delete the callbacks so developers cannot call them and produce unexpected
// behavior.
delete proto.createdCallback;
- delete proto.enteredDocumentCallback;
- delete proto.leftDocumentCallback;
+ delete proto.attachedCallback;
+ delete proto.detachedCallback;
delete proto.attributeChangedCallback;
}
@@ -33,6 +34,6 @@ window.addEventListener('readystatechange', function listener(event) {
if (document.readyState == 'loading')
return;
- registerWebViewElement();
+ registerAppViewElement();
window.removeEventListener(event.type, listener, useCapture);
}, useCapture);
« no previous file with comments | « chrome/renderer/resources/extensions/app_view.js ('k') | chrome/renderer/resources/extensions/web_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698