Index: content/renderer/browser_plugin/browser_plugin_backing_store.h |
diff --git a/content/renderer/browser_plugin/browser_plugin_backing_store.h b/content/renderer/browser_plugin/browser_plugin_backing_store.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4ad89b8f679a85e17e951496f4e81ac5364b6b1a |
--- /dev/null |
+++ b/content/renderer/browser_plugin/browser_plugin_backing_store.h |
@@ -0,0 +1,50 @@ |
+// 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_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__ |
+#define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__ |
+ |
+#include <vector> |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
+#include "ui/gfx/size.h" |
+ |
+class SkCanvas; |
+class TransportDIB; |
+ |
+namespace gfx { |
+class Canvas; |
+class Point; |
+class Rect; |
+} |
+ |
+class BrowserPluginBackingStore { |
Charlie Reis
2012/08/01 23:20:51
Please add a class level comment (for those of us
Fady Samuel
2012/08/02 18:32:47
Done.
Fady Samuel
2012/08/02 18:32:47
Done.
|
+ public: |
+ BrowserPluginBackingStore(const gfx::Size& size); |
+ virtual ~BrowserPluginBackingStore(); |
+ |
+ void PaintToBackingStore( |
+ const gfx::Rect& bitmap_rect, |
+ const std::vector<gfx::Rect>& copy_rects, |
+ TransportDIB* dib); |
+ |
+ void ScrollBackingStore(int dx, |
+ int dy, |
+ const gfx::Rect& clip_rect, |
+ const gfx::Size& view_size); |
+ |
+ const gfx::Size& GetSize() const { return size_; } |
+ |
+ const SkBitmap& GetBitmap() const { return bitmap_; } |
+ |
+ private: |
+ gfx::Size size_; |
+ SkBitmap bitmap_; |
+ scoped_ptr<SkCanvas> canvas_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BrowserPluginBackingStore); |
+}; |
+ |
+#endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__ |