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

Side by Side Diff: chrome/renderer/resources/extensions/automation/automation_event.js

Issue 1938123002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/automation/automation_node.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 var utils = require('utils'); 5 var utils = require('utils');
6 6
7 var AutomationEventImpl = function(type, target) { 7 var AutomationEventImpl = function(type, target) {
8 this.propagationStopped = false; 8 this.propagationStopped = false;
9 9
10 // TODO(aboxhall): make these read-only properties 10 // TODO(aboxhall): make these read-only properties
11 this.type = type; 11 this.type = type;
12 this.target = target; 12 this.target = target;
13 this.eventPhase = Event.NONE; 13 this.eventPhase = Event.NONE;
14 }; 14 };
15 15
16 AutomationEventImpl.prototype = { 16 AutomationEventImpl.prototype = {
17 stopPropagation: function() { 17 stopPropagation: function() {
18 this.propagationStopped = true; 18 this.propagationStopped = true;
19 } 19 }
20 }; 20 };
21 21
22 exports.AutomationEvent = utils.expose( 22 function AutomationEvent() {
23 'AutomationEvent', 23 privates(AutomationEvent).constructPrivate(this, arguments);
24 AutomationEventImpl, 24 }
25 { functions: ['stopPropagation'], 25 utils.expose(AutomationEvent, AutomationEventImpl, {
26 readonly: ['type', 'target', 'eventPhase'] }); 26 functions: [
27 'stopPropagation',
28 ],
29 readonly: [
30 'type',
31 'target',
32 'eventPhase',
33 ],
34 });
35
36 exports.$set('AutomationEvent', AutomationEvent);
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/automation/automation_node.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698