OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.view.View; | 7 import android.view.View; |
8 import android.view.ViewTreeObserver; | 8 import android.view.ViewTreeObserver; |
9 | 9 |
10 import java.util.ArrayList; | 10 import java.util.ArrayList; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 private void updatePosition() { | 94 private void updatePosition() { |
95 int previousPositionX = mPosition[0]; | 95 int previousPositionX = mPosition[0]; |
96 int previousPositionY = mPosition[1]; | 96 int previousPositionY = mPosition[1]; |
97 mView.getLocationInWindow(mPosition); | 97 mView.getLocationInWindow(mPosition); |
98 if (mPosition[0] != previousPositionX || mPosition[1] != previousPositio
nY) { | 98 if (mPosition[0] != previousPositionX || mPosition[1] != previousPositio
nY) { |
99 notifyListeners(); | 99 notifyListeners(); |
100 } | 100 } |
101 } | 101 } |
| 102 |
| 103 /** |
| 104 * Clears installed listener(s). |
| 105 */ |
| 106 @Override |
| 107 public void clearListener() { |
| 108 mListeners.clear(); |
| 109 } |
102 } | 110 } |
103 | 111 |
OLD | NEW |