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

Side by Side Diff: ui/android/resources/ui_resource_provider.h

Issue 755643004: Replace SystemUIResourceManager with ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
(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_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
6 #define UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
7
8 #include "base/containers/hash_tables.h"
9 #include "cc/resources/ui_resource_client.h"
10 #include "ui/android/ui_android_export.h"
11
12 namespace cc {
13 class LayerTreeHost;
14 }
15
16 namespace ui {
17
18 class UIResourceClientAndroid;
19
20 class UI_ANDROID_EXPORT UIResourceProvider {
21 public:
22 UIResourceProvider();
23 ~UIResourceProvider();
24
25 void SetLayerTreeHost(cc::LayerTreeHost* host);
26
27 void UIResourcesAreInvalid();
28
29 cc::UIResourceId CreateUIResource(ui::UIResourceClientAndroid* client);
30
31 void DeleteUIResource(cc::UIResourceId resource_id);
32
33 void SetSupportsETC1NonPowerOfTwo(bool supports_etc1_npot) {
34 supports_etc1_npot_ = supports_etc1_npot;
35 }
36
37 bool SupportsETC1NonPowerOfTwo() const;
38
39 private:
40 typedef base::hash_map<cc::UIResourceId, ui::UIResourceClientAndroid*>
41 UIResourceClientMap;
42 UIResourceClientMap ui_resource_client_map_;
43 cc::LayerTreeHost* host_;
44 bool supports_etc1_npot_;
45
46 DISALLOW_COPY_AND_ASSIGN(UIResourceProvider);
47 };
48
49 } // namespace ui
50
51 #endif // UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698