OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_ | |
6 #define UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_ | |
7 | |
8 #include "cc/resources/ui_resource_client.h" | |
9 #include "ui/base/ui_base_export.h" | |
10 | |
11 namespace ui { | |
12 | |
13 // Interface for loading and accessing shared system UI resources. | |
14 class UI_BASE_EXPORT SystemUIResourceManager { | |
15 public: | |
16 enum ResourceType { OVERSCROLL_EDGE, OVERSCROLL_GLOW }; | |
17 | |
18 virtual ~SystemUIResourceManager() {} | |
19 | |
20 // Trigger loading of the bitmap for the given |resource|, if necessary. | |
21 // Note that this operation may be asynchronous, and subsequent queries to | |
22 // |GetUIResourceId()| will yield a valid result only after loading finishes. | |
23 // This method is particularly useful for idly loading a resource before an | |
24 // explicit cc::UIResourceId is required. | |
25 virtual void EnsureResource(ResourceType resource) = 0; | |
powei
2014/07/31 17:24:28
So it looks like overscroll is not using this righ
jdduke (slow)
2014/07/31 17:40:56
Yeah, it's unused, and I thought of just ripping i
| |
26 | |
27 // Return the resource id associated with |resource|. If loading hasn't yet | |
28 // begun for the given |resource|, it will be triggered immediately. If | |
29 // loading is asynchronous, 0 will be returned until loading has finished, and | |
30 // the caller is responsible for re-querying until a valid id is returned. | |
31 virtual cc::UIResourceId GetUIResourceId(ResourceType resource) = 0; | |
32 }; | |
33 | |
34 } // namespace ui | |
35 | |
36 #endif // UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_ | |
OLD | NEW |