summaryrefslogtreecommitdiffstats
path: root/cc/input/top_controls_state.h
diff options
context:
space:
mode:
authormvanouwerkerk@chromium.org <mvanouwerkerk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 14:00:17 +0000
committermvanouwerkerk@chromium.org <mvanouwerkerk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-21 14:00:17 +0000
commit9b00348a7fd079086fd7bc893ca49ed3b4301c25 (patch)
treebc60b954531ae2dae1a374b46052cdc462817ce1 /cc/input/top_controls_state.h
parent023dedc694673b4be7b386f68eeccd7290772622 (diff)
downloadchromium_src-9b00348a7fd079086fd7bc893ca49ed3b4301c25.zip
chromium_src-9b00348a7fd079086fd7bc893ca49ed3b4301c25.tar.gz
chromium_src-9b00348a7fd079086fd7bc893ca49ed3b4301c25.tar.bz2
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
Diffstat (limited to 'cc/input/top_controls_state.h')
-rw-r--r--cc/input/top_controls_state.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/cc/input/top_controls_state.h b/cc/input/top_controls_state.h
new file mode 100644
index 0000000..87b86c0
--- /dev/null
+++ b/cc/input/top_controls_state.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_INPUT_TOP_CONTROLS_STATE_H_
+#define CC_INPUT_TOP_CONTROLS_STATE_H_
+
+namespace cc {
+enum TopControlsState {
+ SHOWN = 1,
+ HIDDEN = 2,
+ BOTH = 3
+};
+}
+
+#endif // CC_INPUT_TOP_CONTROLS_STATE_H_
+