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

Side by Side Diff: cc/resources/scoped_ui_resource.h

Issue 18191020: UI Resource Manager (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Switched to resource client instead of callback Created 7 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright 2013 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 CC_RESOURCES_SCOPED_UI_RESOURCE_H_
6 #define CC_RESOURCES_SCOPED_UI_RESOURCE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "cc/resources/ui_resource_client.h"
11 #include "ui/gfx/size.h"
12
13 namespace cc {
14
15 class LayerTreeHost;
16
17 class ScopedUIResource : public UIResourceClient {
18 public:
19 ScopedUIResource(LayerTreeHost* host, scoped_refptr<UIResourceBitmap> bitmap);
aelias_OOO_until_Jul13 2013/07/26 23:35:32 Actually, the static Create thing you did earlier
powei 2013/07/30 21:47:00 Done.
20 virtual ~ScopedUIResource();
21
22 virtual scoped_refptr<UIResourceBitmap> Create(bool resource_lost);
23 UIResourceId id() { return id_; }
24
25 protected:
26 // An empty default contructor for testing.
27 ScopedUIResource() {}
28
29 scoped_refptr<UIResourceBitmap> bitmap_;
30 LayerTreeHost* host_;
31 UIResourceId id_;
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(ScopedUIResource);
35 };
36
37 } // namespace cc
38
39 #endif // CC_RESOURCES_SCOPED_UI_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698