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

Unified Diff: content/public/browser/android/synchronous_compositor.h

Issue 15851006: Move synchronous compositor into content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mkosiba comments1 Created 7 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: 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_

Powered by Google App Engine
This is Rietveld 408576698