| OLD | NEW |
| 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 App launcher start page implementation. | 6 * @fileoverview App launcher start page implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 <include src="speech_manager.js"> | 9 <include src="speech_manager.js"> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 setDoodleVisible(true); | 105 setDoodleVisible(true); |
| 106 }; | 106 }; |
| 107 doodleImage.src = doodleData.transparent_large_image.url; | 107 doodleImage.src = doodleData.transparent_large_image.url; |
| 108 | 108 |
| 109 if (doodleData.target_url) { | 109 if (doodleData.target_url) { |
| 110 var doodleLink = document.createElement('a'); | 110 var doodleLink = document.createElement('a'); |
| 111 doodleLink.id = 'doodle_link'; | 111 doodleLink.id = 'doodle_link'; |
| 112 doodleLink.href = doodleData.target_url; | 112 doodleLink.href = doodleData.target_url; |
| 113 doodleLink.target = '_blank'; | 113 doodleLink.target = '_blank'; |
| 114 doodleLink.appendChild(doodleImage); | 114 doodleLink.appendChild(doodleImage); |
| 115 doodleLink.onclick = function() { |
| 116 chrome.send('doodleClicked'); |
| 117 return true; |
| 118 }; |
| 115 this.doodle.appendChild(doodleLink); | 119 this.doodle.appendChild(doodleLink); |
| 116 } else { | 120 } else { |
| 117 this.doodle.appendChild(doodleImage); | 121 this.doodle.appendChild(doodleImage); |
| 118 } | 122 } |
| 119 $('logo_container').appendChild(this.doodle); | 123 $('logo_container').appendChild(this.doodle); |
| 120 } | 124 } |
| 121 | 125 |
| 122 /** | 126 /** |
| 123 * Invoked when the app-list bubble is hidden. | 127 * Invoked when the app-list bubble is hidden. |
| 124 */ | 128 */ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 140 setNaclArch: setNaclArch, | 144 setNaclArch: setNaclArch, |
| 141 onAppListDoodleUpdated: onAppListDoodleUpdated, | 145 onAppListDoodleUpdated: onAppListDoodleUpdated, |
| 142 onAppListShown: onAppListShown, | 146 onAppListShown: onAppListShown, |
| 143 onAppListHidden: onAppListHidden, | 147 onAppListHidden: onAppListHidden, |
| 144 toggleSpeechRecognition: toggleSpeechRecognition | 148 toggleSpeechRecognition: toggleSpeechRecognition |
| 145 }; | 149 }; |
| 146 }); | 150 }); |
| 147 | 151 |
| 148 document.addEventListener('contextmenu', function(e) { e.preventDefault(); }); | 152 document.addEventListener('contextmenu', function(e) { e.preventDefault(); }); |
| 149 document.addEventListener('DOMContentLoaded', appList.startPage.initialize); | 153 document.addEventListener('DOMContentLoaded', appList.startPage.initialize); |
| OLD | NEW |