OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/browser/renderer_host/backing_store.h" | 10 #include "content/browser/renderer_host/backing_store.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class TestBackingStore : public BackingStore { | 14 class TestBackingStore : public BackingStore { |
15 public: | 15 public: |
16 TestBackingStore(RenderWidgetHost* widget, const gfx::Size& size); | 16 TestBackingStore(RenderWidgetHost* widget, const gfx::Size& size); |
17 virtual ~TestBackingStore(); | 17 virtual ~TestBackingStore(); |
18 | 18 |
19 // BackingStore implementation. | 19 // BackingStore implementation. |
20 virtual void PaintToBackingStore( | 20 virtual void PaintToBackingStore( |
21 RenderProcessHost* process, | 21 RenderProcessHost* process, |
22 TransportDIB::Id bitmap, | 22 TransportDIB::Id bitmap, |
23 const gfx::Rect& bitmap_rect, | 23 const gfx::Rect& bitmap_rect, |
24 const std::vector<gfx::Rect>& copy_rects, | 24 const std::vector<gfx::Rect>& copy_rects, |
25 float scale_factor, | 25 float scale_factor, |
26 const base::Closure& completion_callback, | 26 const base::Closure& completion_callback, |
27 bool* scheduled_completion_callback) OVERRIDE; | 27 bool* scheduled_completion_callback) OVERRIDE; |
28 virtual bool CopyFromBackingStore(const gfx::Rect& rect, | 28 virtual bool CopyFromBackingStore(const gfx::Rect& rect, |
29 skia::PlatformCanvas* output) OVERRIDE; | 29 skia::PlatformBitmap* output) OVERRIDE; |
30 virtual void ScrollBackingStore(int dx, int dy, | 30 virtual void ScrollBackingStore(int dx, int dy, |
31 const gfx::Rect& clip_rect, | 31 const gfx::Rect& clip_rect, |
32 const gfx::Size& view_size) OVERRIDE; | 32 const gfx::Size& view_size) OVERRIDE; |
33 private: | 33 private: |
34 DISALLOW_COPY_AND_ASSIGN(TestBackingStore); | 34 DISALLOW_COPY_AND_ASSIGN(TestBackingStore); |
35 }; | 35 }; |
36 | 36 |
37 } // namespace content | 37 } // namespace content |
38 | 38 |
39 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ | 39 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ |
OLD | NEW |