Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerHost.java

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerHost.java
diff --git a/chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerHost.java b/chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerHost.java
new file mode 100644
index 0000000000000000000000000000000000000000..979d802fa877987114c8ec1f45489378bcf8cf78
--- /dev/null
+++ b/chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerHost.java
@@ -0,0 +1,81 @@
+// Copyright 2015 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.chrome.browser.compositor.layouts;
+
+import android.content.Context;
+import android.view.View;
+
+import org.chromium.chrome.browser.compositor.TitleCache;
+import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
+import org.chromium.content.browser.ContentViewCore;
+
+/**
+ * This is the minimal interface of the host view from the layout side.
+ * Any of these functions may be called on the GL thread.
+ */
+public interface LayoutManagerHost {
+ /**
+ * If set to true, the time it takes for ContentView to become ready will be
+ * logged to the screen.
+ */
+ static final boolean LOG_CHROME_VIEW_SHOW_TIME = false;
+
+ /**
+ * Requests a refresh of the visuals.
+ */
+ void requestRender();
+
+ /**
+ * @return The Android context of the host view.
+ */
+ Context getContext();
+
+ /**
+ * @see View#getWidth()
+ * @return The width of the host view.
+ */
+ int getWidth();
+
+ /**
+ * @see View#getHeight()
+ * @return The height of the host view.
+ */
+ int getHeight();
+
+ /**
+ * @return The associated {@link LayoutRenderHost} to be used from the GL Thread.
+ */
+ LayoutRenderHost getLayoutRenderHost();
+
+ /**
+ * Sets the visibility of the content overlays.
+ * @param show True if the content overlays should be shown.
+ */
+ void setContentOverlayVisibility(boolean show);
+
+ /**
+ * @return The {@link TitleCache} to use to store title bitmaps.
+ */
+ TitleCache getTitleCache();
+
+ /**
+ * @return The manager in charge of handling fullscreen changes.
+ */
+ ChromeFullscreenManager getFullscreenManager();
+
+ /**
+ * Called when a new {@link ContentViewCore} has been added to the list of current visible
+ * {@link ContentViewCore}s. While this {@link ContentViewCore} might not be drawing its
+ * contents at this time, it needs to be sized appropriately.
+ * @param content The {@link ContentViewCore} that was added to the current list of visible
+ * {@link ContentViewCore}s.
+ */
+ void onContentViewCoreAdded(ContentViewCore content);
+
+ /**
+ * Called when the currently visible content has been changed.
+ */
+ void onContentChanged();
+}

Powered by Google App Engine
This is Rietveld 408576698