Index: content/public/browser/android/synchronous_compositor.h |
diff --git a/content/public/renderer/android/synchronous_compositor.h b/content/public/browser/android/synchronous_compositor.h |
similarity index 72% |
rename from content/public/renderer/android/synchronous_compositor.h |
rename to content/public/browser/android/synchronous_compositor.h |
index ef97965775eb80781d319ef3cad401ebb88763fa..cffa0f4e5cdba290e1dc4f2dbf9e8b140143eb5a 100644 |
--- a/content/public/renderer/android/synchronous_compositor.h |
+++ b/content/public/browser/android/synchronous_compositor.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
-#define CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
+#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
+#define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
#include "ui/gfx/rect.h" |
#include "ui/gfx/size.h" |
@@ -16,6 +16,8 @@ class Transform; |
namespace content { |
+class WebContents; |
+ |
class SynchronousCompositorClient; |
// Interface for embedders that wish to direct compositing operations |
@@ -23,6 +25,15 @@ class SynchronousCompositorClient; |
// kEnableSyncrhonousRendererCompositor flag is specified. |
class SynchronousCompositor { |
public: |
+ // Must be called once on startup, to install the synchronous compositing |
+ // machinery into this process. |
+ static void Init(); |
+ |
+ // Must be called once per WebContents instance. Ownership of |contents| |
+ // is not transferred; ownership of the SynchronousCompositor is not returned. |
+ static SynchronousCompositor* GetOrCreateForWebContents( |
+ WebContents* contents); |
+ |
// Allows changing or resetting the client to NULL (this must be used if |
// the client is being deleted prior to the DidDestroyCompositor() call |
// being received by the client). Ownership of |client| remains with |
@@ -50,4 +61,4 @@ class SynchronousCompositor { |
} // namespace content |
-#endif // CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |