Index: content/android/java/org/chromium/content/browser/ContentView.java |
diff --git a/content/android/java/org/chromium/content/browser/ContentView.java b/content/android/java/org/chromium/content/browser/ContentView.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..33f907f3bb1023c80baa17902a9b115d0e6df721 |
--- /dev/null |
+++ b/content/android/java/org/chromium/content/browser/ContentView.java |
@@ -0,0 +1,108 @@ |
+// Copyright (c) 2012 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; |
+ |
+import android.content.Context; |
+import android.widget.FrameLayout; |
+ |
+public class ContentView extends FrameLayout { |
+ |
+ /** |
+ * Automatically decide the number of renderer processes to use based on device memory class. |
Yaron
2012/04/19 00:35:34
Add TODO for these. Or actually, why bother includ
Ted C
2012/04/19 01:17:07
Removed all but the one used.
|
+ * */ |
+ public static final int MAX_RENDERERS_AUTOMATIC = -1; |
+ /** |
+ * Use single-process mode that runs the renderer on a separate thread in the main application. |
+ */ |
+ public static final int MAX_RENDERERS_SINGLE_PROCESS = 0; |
+ /** |
+ * Cap on the maximum number of renderer processes that can be requested. |
+ */ |
+ public static final int MAX_RENDERERS_LIMIT = 3; |
+ |
+ /** |
+ * Enable multi-process ContentView. This should be called by the application before |
+ * constructing any ContentView instances. If enabled, ContentView will run renderers in |
+ * separate processes up to the number of processes specified by maxRenderProcesses. If this is |
+ * not called then the default is to run the renderer in the main application on a separate |
+ * thread. |
+ * |
+ * @param context Context used to obtain the application context. |
+ * @param maxRendererProcesses Limit on the number of renderers to use. Each tab runs in its own |
+ * process until the maximum number of processes is reached. The special value of |
+ * MAX_RENDERERS_SINGLE_PROCESS requests single-process mode where the renderer will run in the |
+ * application process in a separate thread. If the special value MAX_RENDERERS_AUTOMATIC is |
+ * used then the number of renderers will be determined based on the device memory class. The |
+ * maximum number of allowed renderers is capped by MAX_RENDERERS_LIMIT. |
+ */ |
+ public static void enableMultiProcess(Context context, int maxRendererProcesses) { |
+ } |
+ |
+ public static void registerPopupOverlayResourceId(int id) { |
Yaron
2012/04/19 00:35:34
Ya, also here... may as well remove.
Ted C
2012/04/19 01:17:07
These are used...added TODO's and javadocs.
|
+ } |
+ |
+ public static void registerPopupOverlayCornerRadius(float r) { |
+ } |
+ |
+ public ContentView(Context context) { |
+ super(context, null); |
+ } |
+ |
+ /** |
+ * Load url without fixing up the url string. Calls from Chrome should be not |
+ * be using this, but should use Tab.loadUrl instead. |
+ * @param url The url to load. |
+ */ |
+ public void loadUrlWithoutUrlSanitization(String url) { |
+ // TODO(tedchoc): Implement. |
+ } |
+ |
+ /** |
+ * Get the URL of the current page. |
+ * |
+ * @return The URL of the current page. |
+ */ |
+ public String getUrl() { |
+ // TODO(tedchoc): Implement. |
+ return null; |
+ } |
+ |
+ /** |
+ * @return Whether the current WebContents has a previous navigation entry. |
+ */ |
+ public boolean canGoBack() { |
+ // TODO(tedchoc): Implement. |
+ return false; |
+ } |
+ |
+ /** |
+ * @return Whether the current WebContents has a navigation entry after the current one. |
+ */ |
+ public boolean canGoForward() { |
+ // TODO(tedchoc): Implement. |
+ return false; |
+ } |
+ |
+ /** |
+ * Goes to the navigation entry before the current one. |
+ */ |
+ public void goBack() { |
+ // TODO(tedchoc): Implement. |
+ } |
+ |
+ /** |
+ * Goes to the navigation entry following the current one. |
+ */ |
+ public void goForward() { |
+ // TODO(tedchoc): Implement. |
+ } |
+ |
+ /** |
+ * Reload the current page. |
+ */ |
+ public void reload() { |
+ // TODO(tedchoc): Implement. |
+ } |
+} |