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

Side by Side Diff: remoting/webapp/base/js/ipc.js

Issue 983023002: [Chromoting] Use compact notation for javascript @private types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « remoting/webapp/base/js/auth_dialog.js ('k') | remoting/webapp/base/js/message_window.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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 7 *
8 * In Chrome Apps, some platform APIs can only be called from the background 8 * In Chrome Apps, some platform APIs can only be called from the background
9 * page (e.g. reloading a chrome.app.AppWindow). Likewise, some chrome API's 9 * page (e.g. reloading a chrome.app.AppWindow). Likewise, some chrome API's
10 * must be initiated by user interaction, which can only be called from the 10 * must be initiated by user interaction, which can only be called from the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 (function() { 42 (function() {
43 43
44 'use strict'; 44 'use strict';
45 45
46 /** 46 /**
47 * @constructor 47 * @constructor
48 * @private 48 * @private
49 */ 49 */
50 base.Ipc = function() { 50 base.Ipc = function() {
51 base.debug.assert(instance_ === null); 51 base.debug.assert(instance_ === null);
52 /** 52 /** @private {!Object<Function>} */
53 * @type {!Object<Function>}
54 * @private
55 */
56 this.handlers_ = {}; 53 this.handlers_ = {};
57 this.onMessageHandler_ = this.onMessage_.bind(this); 54 this.onMessageHandler_ = this.onMessage_.bind(this);
58 chrome.runtime.onMessage.addListener(this.onMessageHandler_); 55 chrome.runtime.onMessage.addListener(this.onMessageHandler_);
59 }; 56 };
60 57
61 /** @private */ 58 /** @private */
62 base.Ipc.prototype.dispose_ = function() { 59 base.Ipc.prototype.dispose_ = function() {
63 chrome.runtime.onMessage.removeListener(this.onMessageHandler_); 60 chrome.runtime.onMessage.removeListener(this.onMessageHandler_);
64 }; 61 };
65 62
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 }; 175 };
179 176
180 base.Ipc.deleteInstance = function() { 177 base.Ipc.deleteInstance = function() {
181 if (instance_) { 178 if (instance_) {
182 instance_.dispose_(); 179 instance_.dispose_();
183 instance_ = null; 180 instance_ = null;
184 } 181 }
185 }; 182 };
186 183
187 })(); 184 })();
OLDNEW
« no previous file with comments | « remoting/webapp/base/js/auth_dialog.js ('k') | remoting/webapp/base/js/message_window.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698