Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.content.browser; | |
| 6 | |
| 7 /** | |
| 8 * Used to register listeners that can be notified of changes to the position of a view. | |
| 9 */ | |
| 10 | |
|
Ted C
2013/10/10 18:16:32
remove extra blank line
cjhopman
2013/10/10 21:35:23
Done.
| |
| 11 public interface PositionObserverInterface { | |
| 12 public interface Listener { | |
| 13 /** | |
| 14 * Called during predraw if the position of the underlying view has chan ged. | |
| 15 */ | |
| 16 public void onPositionChanged(int positionX, int positionY); | |
| 17 } | |
| 18 | |
| 19 /** | |
| 20 * @return The current x position of the observed view. | |
| 21 */ | |
| 22 public int getPositionX(); | |
| 23 | |
| 24 /** | |
| 25 * @return The current y position of the observed view. | |
| 26 */ | |
| 27 public int getPositionY(); | |
| 28 | |
| 29 /** | |
| 30 * Register a listener to be called when the position of the underlying view changes. | |
| 31 */ | |
| 32 public void addListener(Listener listener); | |
| 33 | |
| 34 /** | |
| 35 * Remove a previously installed listener. | |
| 36 */ | |
| 37 public void removeListener(Listener listener); | |
| 38 } | |
| OLD | NEW |