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

Side by Side Diff: remoting/webapp/crd/js/butter_bar.js

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused types Created 5 years, 11 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
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 * @fileoverview 6 * @fileoverview
7 * ButterBar class that is used to show the butter bar with various 7 * ButterBar class that is used to show the butter bar with various
8 * notifications. 8 * notifications.
9 */ 9 */
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * @param {string} storageKey 44 * @param {string} storageKey
45 * @private 45 * @private
46 */ 46 */
47 remoting.ButterBar.prototype.show_ = 47 remoting.ButterBar.prototype.show_ =
48 function(messageId, substitutions, storageKey) { 48 function(messageId, substitutions, storageKey) {
49 this.storageKey_ = storageKey; 49 this.storageKey_ = storageKey;
50 50
51 var messageElement = document.getElementById(remoting.ButterBar.kMessageId_); 51 var messageElement = document.getElementById(remoting.ButterBar.kMessageId_);
52 l10n.localizeElementFromTag(messageElement, messageId, substitutions, true); 52 l10n.localizeElementFromTag(messageElement, messageId, substitutions, true);
53 var acceptLink = 53 var acceptLink =
54 /** @type{Element} */ messageElement.getElementsByTagName('a')[0]; 54 /** @type{Element} */ (messageElement.getElementsByTagName('a')[0]);
55 acceptLink.addEventListener( 55 acceptLink.addEventListener(
56 'click', this.dismiss.bind(this, true), false); 56 'click', this.dismiss.bind(this, true), false);
57 57
58 document.getElementById(remoting.ButterBar.kDismissId_).addEventListener( 58 document.getElementById(remoting.ButterBar.kDismissId_).addEventListener(
59 'click', this.dismiss.bind(this, false), false); 59 'click', this.dismiss.bind(this, false), false);
60 60
61 document.getElementById(remoting.ButterBar.kId_).hidden = false; 61 document.getElementById(remoting.ButterBar.kId_).hidden = false;
62 } 62 }
63 63
64 /** 64 /**
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 var value = {}; 127 var value = {};
128 value[this.storageKey_] = { 128 value[this.storageKey_] = {
129 optIn: accepted, 129 optIn: accepted,
130 date: new Date(), 130 date: new Date(),
131 version: chrome.runtime.getManifest().version 131 version: chrome.runtime.getManifest().version
132 }; 132 };
133 chrome.storage.sync.set(value); 133 chrome.storage.sync.set(value);
134 134
135 document.getElementById(remoting.ButterBar.kId_).hidden = true; 135 document.getElementById(remoting.ButterBar.kId_).hidden = true;
136 }; 136 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698