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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_backing_store.h

Issue 10830072: Browser Plugin: New Implementation (Renderer Side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed leaky Persistents in BrowserPlugin Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__
7
8 #include <vector>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "ui/gfx/size.h"
13
14 class SkCanvas;
15 class TransportDIB;
16
17 namespace gfx {
18 class Canvas;
19 class Point;
20 class Rect;
21 }
22
23 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.
24 public:
25 BrowserPluginBackingStore(const gfx::Size& size);
26 virtual ~BrowserPluginBackingStore();
27
28 void PaintToBackingStore(
29 const gfx::Rect& bitmap_rect,
30 const std::vector<gfx::Rect>& copy_rects,
31 TransportDIB* dib);
32
33 void ScrollBackingStore(int dx,
34 int dy,
35 const gfx::Rect& clip_rect,
36 const gfx::Size& view_size);
37
38 const gfx::Size& GetSize() const { return size_; }
39
40 const SkBitmap& GetBitmap() const { return bitmap_; }
41
42 private:
43 gfx::Size size_;
44 SkBitmap bitmap_;
45 scoped_ptr<SkCanvas> canvas_;
46
47 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBackingStore);
48 };
49
50 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698