OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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.chrome.browser.compositor.layouts; |
| 6 |
| 7 import android.graphics.Rect; |
| 8 import android.graphics.RectF; |
| 9 |
| 10 import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager; |
| 11 |
| 12 /** |
| 13 * Interface that give access the active layout. This is useful to isolate the r
enderer of |
| 14 * all the layout logic. |
| 15 * Called from the GL thread. |
| 16 */ |
| 17 public interface LayoutProvider { |
| 18 /** |
| 19 * @return The layout to be rendered. The caller may not keep a reference of
that value |
| 20 * internally because the value may change without notice. |
| 21 */ |
| 22 Layout getActiveLayout(); |
| 23 |
| 24 /** |
| 25 * @param rect RectF instance to be used to store the result and return. If
null, it uses a new |
| 26 * RectF instance. |
| 27 * @return The rectangle of the layout in its View in dp. |
| 28 */ |
| 29 RectF getViewportDp(RectF rect); |
| 30 |
| 31 /** |
| 32 * @param rect Rect instance to be used to store the result and return. If n
ull, it uses a new |
| 33 * Rect instance. |
| 34 * @return The rectangle of the layout in its View in pixels. |
| 35 */ |
| 36 Rect getViewportPixel(Rect rect); |
| 37 |
| 38 /** |
| 39 * @return The manager in charge of handling fullscreen changes. |
| 40 */ |
| 41 ChromeFullscreenManager getFullscreenManager(); |
| 42 } |
OLD | NEW |