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

Unified 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: Fix clang build failure 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/resources/ui_resource_client_android.h ('k') | ui/android/resources/ui_resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/resources/ui_resource_provider.h
diff --git a/ui/android/resources/ui_resource_provider.h b/ui/android/resources/ui_resource_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..a3b3cbcc439db6bb3d3fab28f9d6cfbf30b9d1e2
--- /dev/null
+++ b/ui/android/resources/ui_resource_provider.h
@@ -0,0 +1,52 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
+#define UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
+
+#include "base/containers/hash_tables.h"
+#include "cc/resources/ui_resource_client.h"
+#include "ui/android/ui_android_export.h"
+
+namespace cc {
+class LayerTreeHost;
+}
+
+namespace ui {
+
+class UIResourceClientAndroid;
+
+class UI_ANDROID_EXPORT UIResourceProvider {
+ public:
+ UIResourceProvider();
+ ~UIResourceProvider();
+
+ void SetLayerTreeHost(cc::LayerTreeHost* host);
+
+ void UIResourcesAreInvalid();
+
+ virtual cc::UIResourceId CreateUIResource(
+ ui::UIResourceClientAndroid* client);
+
+ virtual void DeleteUIResource(cc::UIResourceId resource_id);
+
+ void SetSupportsETC1NonPowerOfTwo(bool supports_etc1_npot) {
+ supports_etc1_npot_ = supports_etc1_npot;
+ }
+
+ virtual bool SupportsETC1NonPowerOfTwo() const;
+
+ private:
+ typedef base::hash_map<cc::UIResourceId, ui::UIResourceClientAndroid*>
+ UIResourceClientMap;
+ UIResourceClientMap ui_resource_client_map_;
+ cc::LayerTreeHost* host_;
+ bool supports_etc1_npot_;
+
+ DISALLOW_COPY_AND_ASSIGN(UIResourceProvider);
+};
+
+} // namespace ui
+
+#endif // UI_ANDROID_RESOURCES_UI_RESOURCE_PROVIDER_H_
« no previous file with comments | « ui/android/resources/ui_resource_client_android.h ('k') | ui/android/resources/ui_resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698