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

Unified Diff: ui/android/resources/ui_resource_android.h

Issue 731133002: Upstream ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/resource_manager.cc ('k') | ui/android/resources/ui_resource_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/resources/ui_resource_android.h
diff --git a/ui/android/resources/ui_resource_android.h b/ui/android/resources/ui_resource_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..c18c0d73ee22075e07ec79dcd77a3b66a673a159
--- /dev/null
+++ b/ui/android/resources/ui_resource_android.h
@@ -0,0 +1,49 @@
+// 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_ANDROID_H_
+#define UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_
+
+#include "base/basictypes.h"
+#include "cc/resources/ui_resource_bitmap.h"
+#include "content/public/browser/android/ui_resource_client_android.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/android/resources/ui_resource_android.h"
+#include "ui/android/ui_android_export.h"
+#include "ui/gfx/android/java_bitmap.h"
+
+namespace ui {
+
+class UI_ANDROID_EXPORT UIResourceAndroid
+ : public content::UIResourceClientAndroid {
+ public:
+ static scoped_ptr<UIResourceAndroid> CreateFromJavaBitmap(
+ content::UIResourceProvider* provider,
+ const gfx::JavaBitmap& java_bitmap);
+
+ ~UIResourceAndroid() override;
+
+ // cc::UIResourceClient implementation.
+ cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
+ bool resource_lost) override;
+
+ // UIResourceClientAndroid implementation.
+ void UIResourceIsInvalid() override;
+
+ cc::UIResourceId id();
+
+ private:
+ UIResourceAndroid(content::UIResourceProvider* provider,
+ const SkBitmap& skbitmap);
+
+ content::UIResourceProvider* provider_;
+ SkBitmap bitmap_;
+ cc::UIResourceId id_;
+
+ DISALLOW_COPY_AND_ASSIGN(UIResourceAndroid);
+};
+
+} // namespace ui
+
+#endif // UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_
« no previous file with comments | « ui/android/resources/resource_manager.cc ('k') | ui/android/resources/ui_resource_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698