1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 cr.define('cloudprint', function() { 6 function learnMore() { 7 chrome.send('LearnMore', ['']); 8 chrome.send('DialogClose', ['']); 9 } 10 11 function fixUpTemplateLink() { 12 var elm = $('anywhere-explain'); 13 if (elm) 14 elm.innerHTML = elm.textContent; 15 } 16 17 function showGaiaLogin(args) { 18 frames['gaialogin'].showGaiaLogin(args); 19 new_height = $('cloudprint-signup').offsetHeight; 20 login_height = frames['gaialogin'].document.body.scrollHeight; 21 if (login_height > new_height) { 22 new_height = login_height; 23 } 24 $('cloudprint-contents').style.height = new_height + 4 + 'px'; 25 } 26 27 function showGaiaSuccessAndSettingUp() { 28 frames['gaialogin'].showGaiaSuccessAndSettingUp() 29 } 30 31 return { 32 learnMore: learnMore, 33 fixUpTemplateLink: fixUpTemplateLink, 34 showGaiaLogin: showGaiaLogin, 35 showGaiaSuccessAndSettingUp: showGaiaSuccessAndSettingUp 36 }; 37 }); 38