Index: content/public/android/java/src/org/chromium/content/browser/PositionObserverInterface.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/PositionObserverInterface.java b/content/public/android/java/src/org/chromium/content/browser/PositionObserverInterface.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5d784c18be3323088be02e853b44e62987410647 |
--- /dev/null |
+++ b/content/public/android/java/src/org/chromium/content/browser/PositionObserverInterface.java |
@@ -0,0 +1,38 @@ |
+// Copyright 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. |
+ |
+package org.chromium.content.browser; |
+ |
+/** |
+ * Used to register listeners that can be notified of changes to the position of a view. |
+ */ |
+ |
Ted C
2013/10/10 18:16:32
remove extra blank line
cjhopman
2013/10/10 21:35:23
Done.
|
+public interface PositionObserverInterface { |
+ public interface Listener { |
+ /** |
+ * Called during predraw if the position of the underlying view has changed. |
+ */ |
+ public void onPositionChanged(int positionX, int positionY); |
+ } |
+ |
+ /** |
+ * @return The current x position of the observed view. |
+ */ |
+ public int getPositionX(); |
+ |
+ /** |
+ * @return The current y position of the observed view. |
+ */ |
+ public int getPositionY(); |
+ |
+ /** |
+ * Register a listener to be called when the position of the underlying view changes. |
+ */ |
+ public void addListener(Listener listener); |
+ |
+ /** |
+ * Remove a previously installed listener. |
+ */ |
+ public void removeListener(Listener listener); |
+} |