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

Side by Side Diff: chrome/browser/resources/menu.js

Issue 3771003: First round UI touch up of DOMUI based network menu. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: sync and try Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/menu.html ('k') | chrome/browser/resources/network_menu.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // How long to wait to open submenu when mouse hovers. 5 // How long to wait to open submenu when mouse hovers.
6 var SUBMENU_OPEN_DELAY_MS = 200; 6 var SUBMENU_OPEN_DELAY_MS = 200;
7 // How long to wait to close submenu when mouse left. 7 // How long to wait to close submenu when mouse left.
8 var SUBMENU_CLOSE_DELAY_MS = 500; 8 var SUBMENU_CLOSE_DELAY_MS = 500;
9 // Scroll repeat interval. 9 // Scroll repeat interval.
10 var SCROLL_INTERVAL_MS = 20; 10 var SCROLL_INTERVAL_MS = 20;
11 // Scrolling amount in pixel. 11 // Scrolling amount in pixel.
12 var SCROLL_TICK_PX = 4; 12 var SCROLL_TICK_PX = 4;
13 // Regular expression to match/find mnemonic key. 13 // Regular expression to match/find mnemonic key.
14 var MNEMONIC_REGEXP = /([^&]*)&(.)(.*)/; 14 var MNEMONIC_REGEXP = /([^&]*)&(.)(.*)/;
15 15
16 var localStrings = new LocalStrings();
17
16 /** 18 /**
17 * Sends 'activate' DOMUI message. 19 * Sends 'activate' DOMUI message.
18 * @param {number} index The index of menu item to activate in menu model. 20 * @param {number} index The index of menu item to activate in menu model.
19 * @param {string} mode The activation mode, one of 'close_and_activate', or 21 * @param {string} mode The activation mode, one of 'close_and_activate', or
20 * 'activate_no_close'. 22 * 'activate_no_close'.
21 * TODO(oshima): change these string to enum numbers once it becomes possible 23 * TODO(oshima): change these string to enum numbers once it becomes possible
22 * to pass number to C++. 24 * to pass number to C++.
23 */ 25 */
24 function sendActivate(index, mode) { 26 function sendActivate(index, mode) {
25 chrome.send('activate', [String(index), mode]); 27 chrome.send('activate', [String(index), mode]);
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 document.getElementById('viewport').updateModel(model); 665 document.getElementById('viewport').updateModel(model);
664 } 666 }
665 667
666 function modelUpdated() { 668 function modelUpdated() {
667 chrome.send('model_updated', []); 669 chrome.send('model_updated', []);
668 } 670 }
669 671
670 function enableScroll(enabled) { 672 function enableScroll(enabled) {
671 document.getElementById('viewport').scrollEnabled = enabled; 673 document.getElementById('viewport').scrollEnabled = enabled;
672 } 674 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/menu.html ('k') | chrome/browser/resources/network_menu.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698