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

Unified Diff: chrome/browser/resources/sync_confirmation/sync_confirmation.js

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use Polymer where relevant. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/sync_confirmation/sync_confirmation.js
diff --git a/chrome/browser/resources/sync_confirmation/sync_confirmation.js b/chrome/browser/resources/sync_confirmation/sync_confirmation.js
new file mode 100644
index 0000000000000000000000000000000000000000..34097132c49db6e86fa2b891f487dd62d2a319d7
--- /dev/null
+++ b/chrome/browser/resources/sync_confirmation/sync_confirmation.js
@@ -0,0 +1,38 @@
+/* Copyright 2015 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+cr.define('sync.confirmation', function() {
+ 'use strict';
+
+ function onConfirm(e) {
+ chrome.send('confirm');
+ }
+
+ function onUndo(e) {
+ chrome.send('undo');
+ }
+
+ function onGoToSettings(e) {
+ chrome.send('goToSettings');
+ }
+
+ function initialize() {
+ $('confirmButton').addEventListener('click', onConfirm);
+ $('undoButton').addEventListener('click', onUndo);
+ $('settingsLink').addEventListener('click', onGoToSettings);
+ chrome.send('initialized');
+ }
+
+ function setUserImageURL(url) {
+ $('profile-picture').src = url;
+ }
+
+ return {
+ initialize: initialize,
+ setUserImageURL: setUserImageURL
+ };
+});
+
+document.addEventListener('DOMContentLoaded', sync.confirmation.initialize);

Powered by Google App Engine
This is Rietveld 408576698