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

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

Issue 6254018: Allow chrome.send to pass number, boolean, null and arrays of those (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review changes Created 9 years, 10 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/dom_ui/shown_sections_handler.cc ('k') | chrome/renderer/dom_ui_bindings.cc » ('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) 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 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more 5 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more
6 // than this many items in the miniview. 6 // than this many items in the miniview.
7 var MAX_MINIVIEW_ITEMS = 15; 7 var MAX_MINIVIEW_ITEMS = 15;
8 8
9 // Extra spacing at the top of the layout. 9 // Extra spacing at the top of the layout.
10 var LAYOUT_SPACING_TOP = 25; 10 var LAYOUT_SPACING_TOP = 25;
11 11
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 function clickHandler(e) { 280 function clickHandler(e) {
281 chrome.send('reopenTab', [String(data.sessionId)]); 281 chrome.send('reopenTab', [String(data.sessionId)]);
282 e.preventDefault(); 282 e.preventDefault();
283 } 283 }
284 a.addEventListener('click', clickHandler); 284 a.addEventListener('click', clickHandler);
285 addClosedMenuEntryWithLink(menu, a); 285 addClosedMenuEntryWithLink(menu, a);
286 } 286 }
287 287
288 function saveShownSections() { 288 function saveShownSections() {
289 chrome.send('setShownSections', [String(shownSections)]); 289 chrome.send('setShownSections', [shownSections]);
290 } 290 }
291 291
292 var LayoutMode = { 292 var LayoutMode = {
293 SMALL: 1, 293 SMALL: 1,
294 NORMAL: 2 294 NORMAL: 2
295 }; 295 };
296 296
297 var layoutMode = useSmallGrid() ? LayoutMode.SMALL : LayoutMode.NORMAL; 297 var layoutMode = useSmallGrid() ? LayoutMode.SMALL : LayoutMode.NORMAL;
298 298
299 function handleWindowResize() { 299 function handleWindowResize() {
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 var promoLink = document.querySelector('#apps-promo-text1 a'); 1420 var promoLink = document.querySelector('#apps-promo-text1 a');
1421 promoLink.id = 'apps-promo-link'; 1421 promoLink.id = 'apps-promo-link';
1422 promoLink.href = localStrings.getString('web_store_url'); 1422 promoLink.href = localStrings.getString('web_store_url');
1423 1423
1424 $('apps-promo-hide').addEventListener('click', function() { 1424 $('apps-promo-hide').addEventListener('click', function() {
1425 chrome.send('hideAppsPromo', []); 1425 chrome.send('hideAppsPromo', []);
1426 document.documentElement.classList.remove('apps-promo-visible'); 1426 document.documentElement.classList.remove('apps-promo-visible');
1427 layoutSections(); 1427 layoutSections();
1428 }); 1428 });
1429 }); 1429 });
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/shown_sections_handler.cc ('k') | chrome/renderer/dom_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698