Hide location bar on Javascript-initiated scroll.
Many sites use window.scrollTo(0,1) and other offsets as a means of
hiding the location bar on mobile. In fact, Android Browser and
iOS support hiding the location bar on any Javascript-initiated
scroll.
See also corresponding WebKit bugs:
https://bugs.webkit.org/show_bug.cgi?id=107027
This is a patch based on on jknottten's work:
https://chromiumcodereview.appspot.com/11967015/
TEST=Test that URL bar is hidden when pressing on the various test buttons in http://jsbin.com/eruxon/5
BUG=165317
Review URL: https://chromiumcodereview.appspot.com/14139013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201303 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 529b363..06f3556 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -29,6 +29,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
#include "ui/gfx/rect_f.h"
#include "ui/gfx/size.h"
+#include "ui/gfx/vector2d.h"
#include "webkit/glue/resource_type.h"
struct BrowserPluginHostMsg_ResizeGuest_Params;
@@ -565,6 +566,7 @@
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update);
+ void OnDidProgrammaticallyScroll(const gfx::Vector2d& scroll_point);
#if defined(OS_ANDROID)
void OnFindMatchRectsReply(int version,
const std::vector<gfx::RectF>& rects,