Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / ui / android / resources / ui_resource_provider.h
bloba3b3cbcc439db6bb3d3fab28f9d6cfbf30b9d1e2
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.
5 #ifndef UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
6 #define UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
8 #include "base/containers/hash_tables.h"
9 #include "cc/resources/ui_resource_client.h"
10 #include "ui/android/ui_android_export.h"
12 namespace cc {
13 class LayerTreeHost;
16 namespace ui {
18 class UIResourceClientAndroid;
20 class UI_ANDROID_EXPORT UIResourceProvider {
21 public:
22 UIResourceProvider();
23 ~UIResourceProvider();
25 void SetLayerTreeHost(cc::LayerTreeHost* host);
27 void UIResourcesAreInvalid();
29 virtual cc::UIResourceId CreateUIResource(
30 ui::UIResourceClientAndroid* client);
32 virtual void DeleteUIResource(cc::UIResourceId resource_id);
34 void SetSupportsETC1NonPowerOfTwo(bool supports_etc1_npot) {
35 supports_etc1_npot_ = supports_etc1_npot;
38 virtual bool SupportsETC1NonPowerOfTwo() const;
40 private:
41 typedef base::hash_map<cc::UIResourceId, ui::UIResourceClientAndroid*>
42 UIResourceClientMap;
43 UIResourceClientMap ui_resource_client_map_;
44 cc::LayerTreeHost* host_;
45 bool supports_etc1_npot_;
47 DISALLOW_COPY_AND_ASSIGN(UIResourceProvider);
50 } // namespace ui
52 #endif // UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_