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.
5 #ifndef CC_RESOURCES_UI_RESOURCE_REQUEST_H_
6 #define CC_RESOURCES_UI_RESOURCE_REQUEST_H_
8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/resources/ui_resource_bitmap.h"
12 #include "cc/resources/ui_resource_client.h"
16 class CC_EXPORT UIResourceRequest
{
18 enum UIResourceRequestType
{
21 UI_RESOURCE_INVALID_REQUEST
24 UIResourceRequest(UIResourceRequestType type
, UIResourceId id
);
25 UIResourceRequest(UIResourceRequestType type
,
27 const UIResourceBitmap
& bitmap
);
28 UIResourceRequest(const UIResourceRequest
& request
);
32 UIResourceRequestType
GetType() const { return type_
; }
33 UIResourceId
GetId() const { return id_
; }
34 UIResourceBitmap
GetBitmap() const {
36 return *bitmap_
.get();
39 UIResourceRequest
& operator=(const UIResourceRequest
& request
);
42 UIResourceRequestType type_
;
44 scoped_ptr
<UIResourceBitmap
> bitmap_
;
49 #endif // CC_RESOURCES_UI_RESOURCE_REQUEST_H_