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

Unified Diff: chrome/renderer/resources/extensions/web_view/chrome_web_view.js

Issue 1938123002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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
Index: chrome/renderer/resources/extensions/web_view/chrome_web_view.js
diff --git a/chrome/renderer/resources/extensions/web_view/chrome_web_view.js b/chrome/renderer/resources/extensions/web_view/chrome_web_view.js
index 2d8c445d994c1e3ecd65907c9eee4694d6155e6e..abad16253e0727be18eaf94dec8c794c4558cdd2 100644
--- a/chrome/renderer/resources/extensions/web_view/chrome_web_view.js
+++ b/chrome/renderer/resources/extensions/web_view/chrome_web_view.js
@@ -12,7 +12,7 @@ var CreateEvent = require('guestViewEvents').CreateEvent;
var EventBindings = require('event_bindings');
var GuestViewInternalNatives = requireNative('guest_view_internal');
var idGeneratorNatives = requireNative('id_generator');
-var Utils = require('utils');
+var utils = require('utils');
var WebViewImpl = require('webView').WebViewImpl;
// This is the only "webViewInternal.onClicked" named event for this renderer.
@@ -122,9 +122,17 @@ WebViewContextMenusImpl.prototype.update = function() {
return $Function.apply(ChromeWebView.contextMenusUpdate, null, args);
};
-var WebViewContextMenus = Utils.expose(
- 'WebViewContextMenus', WebViewContextMenusImpl,
- { functions: ['create', 'remove', 'removeAll', 'update'] });
+function WebViewContextMenus() {
+ privates(WebViewContextMenus).constructPrivate(this, arguments);
+}
+utils.expose(WebViewContextMenus, WebViewContextMenusImpl, {
+ functions: [
+ 'create',
+ 'remove',
+ 'removeAll',
+ 'update',
+ ],
+});
// -----------------------------------------------------------------------------
@@ -132,7 +140,7 @@ WebViewImpl.prototype.maybeSetupContextMenus = function() {
if (!this.contextMenusOnContextMenuEvent_) {
var eventName = 'chromeWebViewInternal.onContextMenuShow';
var eventSchema =
- Utils.lookup(ChromeWebViewSchema.events, 'name', 'onShow');
+ utils.lookup(ChromeWebViewSchema.events, 'name', 'onShow');
var eventOptions = {supportsListeners: true};
this.contextMenusOnContextMenuEvent_ = new ContextMenusOnContextMenuEvent(
this.viewInstanceId, eventName, eventSchema, eventOptions);
@@ -152,7 +160,7 @@ WebViewImpl.prototype.maybeSetupContextMenus = function() {
if (!this.contextMenusOnClickedEvent_) {
var eventName = 'chromeWebViewInternal.onClicked';
var eventSchema =
- Utils.lookup(ChromeWebViewSchema.events, 'name', 'onClicked');
+ utils.lookup(ChromeWebViewSchema.events, 'name', 'onClicked');
var eventOptions = {supportsListeners: true};
var onClickedEvent = new ContextMenusOnClickedEvent(
this.viewInstanceId, eventName, eventSchema, eventOptions);
« no previous file with comments | « chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698