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

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

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using KeyCaptureChange IPC for notification of focus change, and checking if it really changed in t… Created 7 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 /** 6 /**
7 * @fileoverview The local InstantExtended NTP and suggestions dropdown. 7 * @fileoverview The local InstantExtended NTP and suggestions dropdown.
8 */ 8 */
9 9
10 (function() { 10 (function() {
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 ntpApiHandle.onthemechange = onThemeChange; 1665 ntpApiHandle.onthemechange = onThemeChange;
1666 ntpApiHandle.onmostvisitedchange = onMostVisitedChange; 1666 ntpApiHandle.onmostvisitedchange = onMostVisitedChange;
1667 1667
1668 onThemeChange(); 1668 onThemeChange();
1669 onMostVisitedChange(); 1669 onMostVisitedChange();
1670 1670
1671 searchboxApiHandle = topLevelHandle.searchBox; 1671 searchboxApiHandle = topLevelHandle.searchBox;
1672 searchboxApiHandle.onnativesuggestions = updateSuggestions; 1672 searchboxApiHandle.onnativesuggestions = updateSuggestions;
1673 searchboxApiHandle.onchange = updateSuggestions; 1673 searchboxApiHandle.onchange = updateSuggestions;
1674 searchboxApiHandle.onkeypress = handleKeyPress; 1674 searchboxApiHandle.onkeypress = handleKeyPress;
1675 // TODO(donnd): consider adding an onfocuschange handler.
samarth 2013/05/13 20:56:53 Not need to add a TODO here. I don't see a good r
Donn Denman 2013/05/13 23:44:50 Done.
1675 // TODO(jered): Re-enable this after http://crbug.com/236492 is fixed. 1676 // TODO(jered): Re-enable this after http://crbug.com/236492 is fixed.
1676 // searchboxApiHandle.onmarginchange = setSuggestionStyles; 1677 // searchboxApiHandle.onmarginchange = setSuggestionStyles;
1677 if (window.innerWidth > 0) { 1678 if (window.innerWidth > 0) {
1678 setSuggestionStyles(); 1679 setSuggestionStyles();
1679 } else { 1680 } else {
1680 // Wait until the overlay is shown to initialize suggestion margins. 1681 // Wait until the overlay is shown to initialize suggestion margins.
1681 window.addEventListener('resize', setSuggestionStyles); 1682 window.addEventListener('resize', setSuggestionStyles);
1682 } 1683 }
1683 searchboxApiHandle.onsubmit = function() { 1684 searchboxApiHandle.onsubmit = function() {
1684 var value = searchboxApiHandle.value; 1685 var value = searchboxApiHandle.value;
(...skipping 20 matching lines...) Expand all
1705 } 1706 }
1706 } 1707 }
1707 1708
1708 document.addEventListener('DOMContentLoaded', init); 1709 document.addEventListener('DOMContentLoaded', init);
1709 window.addEventListener('message', handleMessage, false); 1710 window.addEventListener('message', handleMessage, false);
1710 window.addEventListener('blur', function() { 1711 window.addEventListener('blur', function() {
1711 if (activeBox) 1712 if (activeBox)
1712 activeBox.clearHover(); 1713 activeBox.clearHover();
1713 }, false); 1714 }, false);
1714 })(); 1715 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/omnibox/omnibox_edit_model.h » ('j') | chrome/browser/ui/search/instant_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698