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

Side by Side Diff: content/browser/renderer_host/backing_store_aura.h

Issue 10804031: Move more files into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_BACKING_STORE_AURA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_AURA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_AURA_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/renderer_host/backing_store.h" 9 #include "content/browser/renderer_host/backing_store.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
12 12
13 class SkCanvas; 13 class SkCanvas;
14 14
15 namespace gfx { 15 namespace gfx {
16 class Point; 16 class Point;
17 class Canvas; 17 class Canvas;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 class RenderProcessHost; 21 class RenderProcessHost;
22 }
23 22
24 // A backing store that uses skia. This is the backing store used by 23 // A backing store that uses skia. This is the backing store used by
25 // RenderWidgetHostViewAura. 24 // RenderWidgetHostViewAura.
26 class BackingStoreAura : public BackingStore { 25 class BackingStoreAura : public BackingStore {
27 public: 26 public:
28 CONTENT_EXPORT BackingStoreAura( 27 CONTENT_EXPORT BackingStoreAura(
29 content::RenderWidgetHost* widget, 28 RenderWidgetHost* widget,
30 const gfx::Size& size); 29 const gfx::Size& size);
31 30
32 virtual ~BackingStoreAura(); 31 virtual ~BackingStoreAura();
33 32
34 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point, 33 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point,
35 gfx::Canvas* canvas); 34 gfx::Canvas* canvas);
36 35
37 // Called when the view's backing scale factor changes. 36 // Called when the view's backing scale factor changes.
38 void ScaleFactorChanged(float device_scale_factor); 37 void ScaleFactorChanged(float device_scale_factor);
39 38
40 // BackingStore implementation. 39 // BackingStore implementation.
41 virtual size_t MemorySize() OVERRIDE; 40 virtual size_t MemorySize() OVERRIDE;
42 virtual void PaintToBackingStore( 41 virtual void PaintToBackingStore(
43 content::RenderProcessHost* process, 42 RenderProcessHost* process,
44 TransportDIB::Id bitmap, 43 TransportDIB::Id bitmap,
45 const gfx::Rect& bitmap_rect, 44 const gfx::Rect& bitmap_rect,
46 const std::vector<gfx::Rect>& copy_rects, 45 const std::vector<gfx::Rect>& copy_rects,
47 float scale_factor, 46 float scale_factor,
48 const base::Closure& completion_callback, 47 const base::Closure& completion_callback,
49 bool* scheduled_completion_callback) OVERRIDE; 48 bool* scheduled_completion_callback) OVERRIDE;
50 virtual bool CopyFromBackingStore(const gfx::Rect& rect, 49 virtual bool CopyFromBackingStore(const gfx::Rect& rect,
51 skia::PlatformCanvas* output) OVERRIDE; 50 skia::PlatformCanvas* output) OVERRIDE;
52 virtual void ScrollBackingStore(int dx, int dy, 51 virtual void ScrollBackingStore(int dx, int dy,
53 const gfx::Rect& clip_rect, 52 const gfx::Rect& clip_rect,
54 const gfx::Size& view_size) OVERRIDE; 53 const gfx::Size& view_size) OVERRIDE;
55 54
56 private: 55 private:
57 SkBitmap bitmap_; 56 SkBitmap bitmap_;
58 57
59 scoped_ptr<SkCanvas> canvas_; 58 scoped_ptr<SkCanvas> canvas_;
60 int device_scale_factor_; 59 int device_scale_factor_;
61 60
62 DISALLOW_COPY_AND_ASSIGN(BackingStoreAura); 61 DISALLOW_COPY_AND_ASSIGN(BackingStoreAura);
63 }; 62 };
64 63
64 } // namespace content
65
65 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_AURA_H_ 66 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/backing_store.cc ('k') | content/browser/renderer_host/backing_store_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698