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

Unified Diff: content/browser/android/draw_delegate_impl.h

Issue 10823051: ContentShell rendering support on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Ted's comments 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/browser/android/draw_delegate_impl.h
diff --git a/content/browser/android/draw_delegate_impl.h b/content/browser/android/draw_delegate_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..5633ec8ae46259e95afe879375c607f08702fff8
--- /dev/null
+++ b/content/browser/android/draw_delegate_impl.h
@@ -0,0 +1,40 @@
+// 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_BROWSER_ANDROID_DRAW_DELEGATE_IMPL_H_
+#define CONTENT_BROWSER_ANDROID_DRAW_DELEGATE_IMPL_H_
+
+#include "base/callback.h"
+#include "content/public/browser/android/draw_delegate.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/size.h"
+
+namespace content {
+
+class DrawDelegateImpl : public DrawDelegate {
+ public:
+ static DrawDelegateImpl* GetInstance();
+ DrawDelegateImpl();
+ virtual ~DrawDelegateImpl();
+
+ // DrawDelegate implementation.
+ virtual void SetUpdateCallback(
+ const SurfaceUpdatedCallback& callback) OVERRIDE;
+ virtual void SetBounds(gfx::Size& size) OVERRIDE { size_ = size; }
+
+ void SetDrawSurface(gfx::GLSurfaceHandle handle) { handle_ = handle; }
+ void OnSurfaceUpdated(uint64 texture, RenderWidgetHostView* view,
+ const SurfacePresentedCallback& present_callback);
+ gfx::Size GetBounds() { return size_; }
+ gfx::GLSurfaceHandle GetDrawSurface() { return handle_; }
+
+ protected:
+ SurfaceUpdatedCallback draw_callback_;
+ gfx::GLSurfaceHandle handle_;
+ gfx::Size size_;
jam 2012/07/31 22:46:15 nit: disallow_copy_and_assign
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_DRAW_DELEGATE_IMPL_H_
« no previous file with comments | « no previous file | content/browser/android/draw_delegate_impl.cc » ('j') | content/browser/android/graphics_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698