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

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: 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
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 d5d58afbbfd0f7cd9f5855ec06fc09226e307b5c..1a2d01a705e1ac25204105502da42de872e9f93b 100644
--- a/chrome/renderer/resources/extensions/searchbox_api.js
+++ b/chrome/renderer/resources/extensions/searchbox_api.js
@@ -102,6 +102,8 @@ if (!chrome.embeddedSearch) {
native function FocusOmnibox();
native function StartCapturingKeyStrokes();
native function StopCapturingKeyStrokes();
+ native function ShowBars();
+ native function HideBars();
function SafeWrapSuggestion(restrictedText) {
return SafeWrap(restrictedText, window.innerWidth - 155, 22);
@@ -266,6 +268,12 @@ if (!chrome.embeddedSearch) {
this.stopCapturingKeyStrokes = function() {
StopCapturingKeyStrokes();
};
+ this.showBars = function() {
+ ShowBars();
+ };
+ this.hideBars = function() {
+ HideBars();
+ };
this.onchange = null;
this.onsubmit = null;
this.oncancel = null;
@@ -275,6 +283,7 @@ if (!chrome.embeddedSearch) {
this.oncontextchange = null;
this.onmarginchange = null;
this.onnativesuggestions = null;
+ this.onbarshidden = null;
// DEPRECATED. These methods are from the legacy searchbox API.
// TODO(jered): Delete these.

Powered by Google App Engine
This is Rietveld 408576698