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

Side by Side Diff: content/browser/android/ui_resource_android_impl.h

Issue 731133002: Upstream ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build failure Created 6 years, 1 month 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 CONTENT_BROWSER_ANDROID_UI_RESOURCE_ANDROID_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_UI_RESOURCE_ANDROID_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "content/public/browser/android/ui_resource_android.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "ui/gfx/android/java_bitmap.h"
13
14 namespace content {
15
16 class UIResourceAndroidImpl : public UIResourceAndroid {
17 public:
18 static scoped_ptr<UIResourceAndroidImpl> CreateFromJavaBitmap(
19 content::UIResourceProvider* provider,
20 jobject bitmap_object);
21
22 static scoped_ptr<UIResourceAndroidImpl> CreateFromJavaBitmap(
23 content::UIResourceProvider* provider,
24 const gfx::JavaBitmap& java_bitmap);
25
26 virtual ~UIResourceAndroidImpl() override;
27
28 // cc::UIResourceClient implementation.
29 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
30 bool resource_lost) override;
31
32 // content::UIResourceClientAndroid implementation.
33 void UIResourceIsInvalid() override;
34
35 cc::UIResourceId id() override;
36
37 private:
38 UIResourceAndroidImpl(content::UIResourceProvider* provider,
39 const SkBitmap& skbitmap);
40
41 content::UIResourceProvider* provider_;
42 SkBitmap bitmap_;
43 cc::UIResourceId id_;
44
45 DISALLOW_COPY_AND_ASSIGN(UIResourceAndroidImpl);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_ANDROID_UI_RESOURCE_ANDROID_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698