| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 The page that shows other devices and their tabs. | 6 * @fileoverview The page that shows other devices and their tabs. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('ntp', function() { | 9 cr.define('ntp', function() { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 */ | 74 */ |
| 75 handleClick_: function(e) { | 75 handleClick_: function(e) { |
| 76 // Records the index of this tile. | 76 // Records the index of this tile. |
| 77 // TODO(vadimt): 8 is the maximum value for the histogram. Replace with a | 77 // TODO(vadimt): 8 is the maximum value for the histogram. Replace with a |
| 78 // correct number for devices. | 78 // correct number for devices. |
| 79 chrome.send('metricsHandler:recordInHistogram', | 79 chrome.send('metricsHandler:recordInHistogram', |
| 80 ['NewTabPage.OtherDevice', this.index, 8]); | 80 ['NewTabPage.OtherDevice', this.index, 8]); |
| 81 | 81 |
| 82 // Ask the native side to show a popup listing the devices's tabs. | 82 // Ask the native side to show a popup listing the devices's tabs. |
| 83 chrome.send('showOtherDeviceSessionPopup', | 83 chrome.send('showOtherDeviceSessionPopup', |
| 84 [this.data.tag, e.clientX, e.clientY]); | 84 [this.data.tag, e.screenX, e.screenY]); |
| 85 }, | 85 }, |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * Clears the DOM hierarchy for this node, setting it back to the default | 88 * Clears the DOM hierarchy for this node, setting it back to the default |
| 89 * for a blank tile. | 89 * for a blank tile. |
| 90 */ | 90 */ |
| 91 reset: function() { | 91 reset: function() { |
| 92 this.innerHTML = | 92 this.innerHTML = |
| 93 '<div class="device-image"></div>' + | 93 '<div class="device-image"></div>' + |
| 94 '<div class="devices-infopane">' + | 94 '<div class="devices-infopane">' + |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 } | 214 } |
| 215 | 215 |
| 216 logEvent('devices.layout: ' + (Date.now() - startTime)); | 216 logEvent('devices.layout: ' + (Date.now() - startTime)); |
| 217 }, | 217 }, |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 return { | 220 return { |
| 221 OtherDevicesPage: OtherDevicesPage, | 221 OtherDevicesPage: OtherDevicesPage, |
| 222 }; | 222 }; |
| 223 }); | 223 }); |
| OLD | NEW |