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

Side by Side Diff: chrome/browser/resources/local_discovery/local_discovery.js

Issue 23780002: Actual cancelation of registration when cancel buttons pressed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * Javascript for local_discovery.html, served from chrome://devices/ 6 * Javascript for local_discovery.html, served from chrome://devices/
7 * This is used to show discoverable devices near the user. 7 * This is used to show discoverable devices near the user.
8 * 8 *
9 * The simple object defined in this javascript file listens for 9 * The simple object defined in this javascript file listens for
10 * callbacks from the C++ code saying that a new device is available. 10 * callbacks from the C++ code saying that a new device is available.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 uber.invokeMethodOnParent('beginInterceptingEvents'); 137 uber.invokeMethodOnParent('beginInterceptingEvents');
138 } 138 }
139 139
140 /** 140 /**
141 * Show the register overlay. 141 * Show the register overlay.
142 */ 142 */
143 function hideRegisterOverlay() { 143 function hideRegisterOverlay() {
144 $('register-overlay').classList.remove('showing'); 144 $('register-overlay').classList.remove('showing');
145 $('overlay').hidden = true; 145 $('overlay').hidden = true;
146 uber.invokeMethodOnParent('stopInterceptingEvents'); 146 uber.invokeMethodOnParent('stopInterceptingEvents');
147 chrome.send('cancelRegistration');
147 } 148 }
148 149
149 /** 150 /**
150 * Clear a DOM element of all children. 151 * Clear a DOM element of all children.
151 * @param {HTMLElement} element DOM element to clear. 152 * @param {HTMLElement} element DOM element to clear.
152 */ 153 */
153 function clearElement(element) { 154 function clearElement(element) {
154 while (element.firstChild) { 155 while (element.firstChild) {
155 element.removeChild(element.firstChild); 156 element.removeChild(element.firstChild);
156 } 157 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 }); 272 });
272 273
273 return { 274 return {
274 registrationSuccess: registrationSuccess, 275 registrationSuccess: registrationSuccess,
275 registrationFailed: registrationFailed, 276 registrationFailed: registrationFailed,
276 onDeviceUpdate: onDeviceUpdate, 277 onDeviceUpdate: onDeviceUpdate,
277 requestUser: requestUser, 278 requestUser: requestUser,
278 registrationConfirmedOnPrinter: registrationConfirmedOnPrinter 279 registrationConfirmedOnPrinter: registrationConfirmedOnPrinter
279 }; 280 };
280 }); 281 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698