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

Side by Side Diff: ui/android/resources/ui_resource_android.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_ 5 #ifndef UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_
6 #define UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_ 6 #define UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/resources/ui_resource_bitmap.h" 9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "content/public/browser/android/ui_resource_client_android.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "ui/android/resources/ui_resource_android.h" 11 #include "ui/android/resources/ui_resource_android.h"
12 #include "ui/android/resources/ui_resource_client_android.h"
13 #include "ui/android/ui_android_export.h" 13 #include "ui/android/ui_android_export.h"
14 #include "ui/gfx/android/java_bitmap.h" 14 #include "ui/gfx/android/java_bitmap.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 class UI_ANDROID_EXPORT UIResourceAndroid 18 class UIResourceProvider;
19 : public content::UIResourceClientAndroid { 19
20 class UI_ANDROID_EXPORT UIResourceAndroid : public ui::UIResourceClientAndroid {
20 public: 21 public:
21 static scoped_ptr<UIResourceAndroid> CreateFromJavaBitmap( 22 static scoped_ptr<UIResourceAndroid> CreateFromJavaBitmap(
22 content::UIResourceProvider* provider, 23 ui::UIResourceProvider* provider,
23 const gfx::JavaBitmap& java_bitmap); 24 const gfx::JavaBitmap& java_bitmap);
24 25
25 ~UIResourceAndroid() override; 26 ~UIResourceAndroid() override;
26 27
27 // cc::UIResourceClient implementation. 28 // cc::UIResourceClient implementation.
28 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid, 29 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
29 bool resource_lost) override; 30 bool resource_lost) override;
30 31
31 // UIResourceClientAndroid implementation. 32 // ui::UIResourceClientAndroid implementation.
32 void UIResourceIsInvalid() override; 33 void UIResourceIsInvalid() override;
33 34
34 cc::UIResourceId id(); 35 cc::UIResourceId id();
35 36
36 private: 37 private:
37 UIResourceAndroid(content::UIResourceProvider* provider, 38 UIResourceAndroid(ui::UIResourceProvider* provider, const SkBitmap& skbitmap);
38 const SkBitmap& skbitmap);
39 39
40 content::UIResourceProvider* provider_; 40 ui::UIResourceProvider* provider_;
41 SkBitmap bitmap_; 41 SkBitmap bitmap_;
42 cc::UIResourceId id_; 42 cc::UIResourceId id_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(UIResourceAndroid); 44 DISALLOW_COPY_AND_ASSIGN(UIResourceAndroid);
45 }; 45 };
46 46
47 } // namespace ui 47 } // namespace ui
48 48
49 #endif // UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_ 49 #endif // UI_ANDROID_RESOURCES_UI_RESOURCE_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/android/resources/resource_manager_unittest.cc ('k') | ui/android/resources/ui_resource_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698