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

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

Issue 10823051: ContentShell rendering support on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix intents Created 8 years, 5 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/draw_delegate.h
diff --git a/content/public/browser/android/draw_delegate.h b/content/public/browser/android/draw_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..6811a9ab0ce8fe5cb2263f5b122018b23d59621f
--- /dev/null
+++ b/content/public/browser/android/draw_delegate.h
@@ -0,0 +1,41 @@
+// 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.
+
+#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DRAW_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_ANDROID_DRAW_DELEGATE_H_
+
+#include "base/callback.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/size.h"
+
+namespace content {
+
+class RenderWidgetHostView;
+
+// This interface facilitates the communication between compositor and
+// UI with respect to new frames arriving and acknowledging when they
+// have been presented.
+class DrawDelegate {
+ public:
+ static DrawDelegate* GetInstance();
+ virtual ~DrawDelegate() { }
+
+ // Callback to be run after the frame has been drawn. It passes back
+ // a synchronization point identifier.
+ typedef base::Callback<void(uint32)> SurfacePresentedCallback;
+
+ // Notification to the UI that the surface identified by the texture id
+ // has been updated.
+ typedef base::Callback<void(
+ uint64,
+ RenderWidgetHostView*,
+ const SurfacePresentedCallback&)> SurfaceUpdatedCallback;
+
+ virtual void SetUpdateCallback(const SurfaceUpdatedCallback& callback) = 0;
+ virtual void SetBounds(gfx::Size& size) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_DRAW_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698