diff options
| author | Derek Sollenberger <djsollen@google.com> | 2010-05-10 12:38:54 -0400 |
|---|---|---|
| committer | Derek Sollenberger <djsollen@google.com> | 2010-05-17 13:49:40 -0400 |
| commit | 90b6e4879304c6ac8240cdeb9a4aea94a27cda58 (patch) | |
| tree | 41885d4cead982c0c9bb7489618a5bc1d45e4291 /core/java/android/webkit/ZoomControlBase.java | |
| parent | 38a9544825c6f3482237f9e29cddee58ebc093c3 (diff) | |
Refactor the on-screen zoom controls into a separate class.
This CL is the first in a series of CL's that will extract the
zoom code from WebView and put it into ZoomManager. This initial
CL only extracts the on-screen zoom controls and required variables
into the ZoomManager. Since the on-screen controls are well defined
I put them into their own class called ZoomControls.
All of WebView's zoom interactions are handled by the ZoomManager.
The ZoomManager can then handle the request internally or as in the
case of on-screen controls pass the request to another class.
Change-Id: Icfc91ed0456c88d633249c26b9afc7dd216f75a1
http://b/2671604
Diffstat (limited to 'core/java/android/webkit/ZoomControlBase.java')
| -rw-r--r-- | core/java/android/webkit/ZoomControlBase.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/core/java/android/webkit/ZoomControlBase.java b/core/java/android/webkit/ZoomControlBase.java new file mode 100644 index 000000000000..be9e8f3003c0 --- /dev/null +++ b/core/java/android/webkit/ZoomControlBase.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.webkit; + +interface ZoomControlBase { + + /** + * Causes the on-screen zoom control to be made visible + */ + public void show(); + + /** + * Causes the on-screen zoom control to disappear + */ + public void hide(); + + /** + * Enables the control to update its state if necessary in response to a + * change in the pages zoom level. For example, if the max zoom level is + * reached then the control can disable the button for zooming in. + */ + public void update(); + + /** + * Checks to see if the control is currently visible to the user. + */ + public boolean isVisible(); +} |
