Sort unlaunched apps on app list start page by apps grid order.
[chromium-blink-merge.git] / ui / android / resources / ui_resource_android.h
blob60f7888b4d68709f6c0fe8983b7709b67c1d3d53
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_ANDROID_H_
6 #define UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_
8 #include "base/basictypes.h"
9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "third_party/skia/include/core/SkBitmap.h"
11 #include "ui/android/resources/ui_resource_client_android.h"
12 #include "ui/android/ui_android_export.h"
13 #include "ui/gfx/android/java_bitmap.h"
15 namespace ui {
17 class UIResourceProvider;
19 class UI_ANDROID_EXPORT UIResourceAndroid : public ui::UIResourceClientAndroid {
20 public:
21 static scoped_ptr<UIResourceAndroid> CreateFromJavaBitmap(
22 ui::UIResourceProvider* provider,
23 const gfx::JavaBitmap& java_bitmap);
25 ~UIResourceAndroid() override;
27 // cc::UIResourceClient implementation.
28 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
29 bool resource_lost) override;
31 // ui::UIResourceClientAndroid implementation.
32 void UIResourceIsInvalid() override;
34 cc::UIResourceId id();
36 private:
37 UIResourceAndroid(ui::UIResourceProvider* provider, const SkBitmap& skbitmap);
39 ui::UIResourceProvider* provider_;
40 SkBitmap bitmap_;
41 cc::UIResourceId id_;
43 DISALLOW_COPY_AND_ASSIGN(UIResourceAndroid);
46 } // namespace ui
48 #endif // UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_