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

Side by Side Diff: chrome/browser/resources/ntp_search/other_devices_page.js

Issue 11009013: NTP5: Starting implementation of a native menu for showing other device sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dumb typo. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/other_device_menu_cocoa.h » ('j') | chrome/browser/ui/views/other_device_menu_views.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698