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

Unified Diff: chrome/renderer/resources/extensions/searchbox_api.js

Issue 12631008: alternate ntp: implement Show/HideBars API to reduce jank when showing/hiding bars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed build break Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/search_types.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/searchbox_api.js
diff --git a/chrome/renderer/resources/extensions/searchbox_api.js b/chrome/renderer/resources/extensions/searchbox_api.js
index f93a54ce9979cfa0948fdf9bde0b8e3c1e32b2f4..cb9524b96ee51749224ba27fb79ba9a61048e4cc 100644
--- a/chrome/renderer/resources/extensions/searchbox_api.js
+++ b/chrome/renderer/resources/extensions/searchbox_api.js
@@ -105,6 +105,8 @@ if (!chrome.embeddedSearch) {
native function StartCapturingKeyStrokes();
native function StopCapturingKeyStrokes();
native function NavigateSearchBox();
+ native function ShowBars();
+ native function HideBars();
function SafeWrapSuggestion(restrictedText) {
return SafeWrap(restrictedText, window.innerWidth - 155, 22);
@@ -270,6 +272,12 @@ if (!chrome.embeddedSearch) {
this.navigateContentWindow = function(destination, disposition) {
NavigateSearchBox(destination, disposition);
}
+ this.showBars = function() {
+ ShowBars();
+ };
+ this.hideBars = function() {
+ HideBars();
+ };
this.onchange = null;
this.onsubmit = null;
this.oncancel = null;
@@ -278,6 +286,7 @@ if (!chrome.embeddedSearch) {
this.onkeycapturechange = null;
this.onmarginchange = null;
this.onnativesuggestions = null;
+ this.onbarshidden = null;
// DEPRECATED. These methods are from the legacy searchbox API.
// TODO(jered): Delete these.
« no previous file with comments | « chrome/common/search_types.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698