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

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 7227025: ntp4: fix app context menu z-order (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added bug ref Created 9 years, 5 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 | « no previous file | chrome/browser/resources/new_tab.js » ('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) 2011 The Chromium Authors. All rights reserved. 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 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 const BookmarkList = bmm.BookmarkList; 5 const BookmarkList = bmm.BookmarkList;
6 const BookmarkTree = bmm.BookmarkTree; 6 const BookmarkTree = bmm.BookmarkTree;
7 const ListItem = cr.ui.ListItem; 7 const ListItem = cr.ui.ListItem;
8 const TreeItem = cr.ui.TreeItem; 8 const TreeItem = cr.ui.TreeItem;
9 const LinkKind = cr.LinkKind; 9 const LinkKind = cr.LinkKind;
10 const Command = cr.ui.Command; 10 const Command = cr.ui.Command;
11 const CommandBinding = cr.ui.CommandBinding; 11 const CommandBinding = cr.ui.CommandBinding;
12 const Menu = cr.ui.Menu; 12 const Menu = cr.ui.Menu;
13 const MenuButton = cr.ui.MenuButton; 13 const MenuButton = cr.ui.MenuButton;
14 const Promise = cr.Promise; 14 const Promise = cr.Promise;
15 15
16 // Sometimes the extension API is not initialized. 16 // Sometimes the extension API is not initialized.
17 if (!chrome.bookmarks) 17 if (!chrome.bookmarks)
18 console.error('Bookmarks extension API is not available'); 18 console.error('Bookmarks extension API is not available');
19 19
20 // Allow platform specific CSS rules. 20 cr.enablePlatformSpecificCSSRules();
21 if (cr.isMac)
22 document.documentElement.setAttribute('os', 'mac');
23 21
24 /** 22 /**
25 * The local strings object which is used to do the translation. 23 * The local strings object which is used to do the translation.
26 * @type {!LocalStrings} 24 * @type {!LocalStrings}
27 */ 25 */
28 var localStrings = new LocalStrings; 26 var localStrings = new LocalStrings;
29 27
30 // Get the localized strings from the backend. 28 // Get the localized strings from the backend.
31 chrome.experimental.bookmarkManager.getStrings(function(data) { 29 chrome.experimental.bookmarkManager.getStrings(function(data) {
32 // The strings may contain & which we need to strip. 30 // The strings may contain & which we need to strip.
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 document.addEventListener('copy', handle('copy-command')); 1613 document.addEventListener('copy', handle('copy-command'));
1616 document.addEventListener('cut', handle('cut-command')); 1614 document.addEventListener('cut', handle('cut-command'));
1617 1615
1618 var pasteHandler = handle('paste-command'); 1616 var pasteHandler = handle('paste-command');
1619 document.addEventListener('paste', function(e) { 1617 document.addEventListener('paste', function(e) {
1620 // Paste is a bit special since we need to do an async call to see if we can 1618 // Paste is a bit special since we need to do an async call to see if we can
1621 // paste because the paste command might not be up to date. 1619 // paste because the paste command might not be up to date.
1622 updatePasteCommand(pasteHandler); 1620 updatePasteCommand(pasteHandler);
1623 }); 1621 });
1624 })(); 1622 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/new_tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698