OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "content/browser/renderer_host/backing_store.h" | 10 #include "content/browser/renderer_host/backing_store.h" |
11 | 11 |
12 class TestBackingStore : public BackingStore { | 12 class TestBackingStore : public BackingStore { |
13 public: | 13 public: |
14 TestBackingStore(RenderWidgetHost* widget, const gfx::Size& size); | 14 TestBackingStore(RenderWidgetHost* widget, const gfx::Size& size); |
15 virtual ~TestBackingStore(); | 15 virtual ~TestBackingStore(); |
16 | 16 |
17 // BackingStore implementation. | 17 // BackingStore implementation. |
18 virtual void PaintToBackingStore( | 18 virtual void PaintToBackingStore( |
19 RenderProcessHost* process, | 19 content::RenderProcessHost* process, |
20 TransportDIB::Id bitmap, | 20 TransportDIB::Id bitmap, |
21 const gfx::Rect& bitmap_rect, | 21 const gfx::Rect& bitmap_rect, |
22 const std::vector<gfx::Rect>& copy_rects, | 22 const std::vector<gfx::Rect>& copy_rects, |
23 const base::Closure& completion_callback, | 23 const base::Closure& completion_callback, |
24 bool* scheduled_completion_callback) OVERRIDE; | 24 bool* scheduled_completion_callback) OVERRIDE; |
25 virtual bool CopyFromBackingStore(const gfx::Rect& rect, | 25 virtual bool CopyFromBackingStore(const gfx::Rect& rect, |
26 skia::PlatformCanvas* output) OVERRIDE; | 26 skia::PlatformCanvas* output) OVERRIDE; |
27 virtual void ScrollBackingStore(int dx, int dy, | 27 virtual void ScrollBackingStore(int dx, int dy, |
28 const gfx::Rect& clip_rect, | 28 const gfx::Rect& clip_rect, |
29 const gfx::Size& view_size) OVERRIDE; | 29 const gfx::Size& view_size) OVERRIDE; |
30 private: | 30 private: |
31 DISALLOW_COPY_AND_ASSIGN(TestBackingStore); | 31 DISALLOW_COPY_AND_ASSIGN(TestBackingStore); |
32 }; | 32 }; |
33 | 33 |
34 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ | 34 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_BACKING_STORE_H_ |
OLD | NEW |