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

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: Add generated enum class to BUILD.gn 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 <jni.h>
9
10 #include "base/basictypes.h"
11 #include "cc/resources/ui_resource_bitmap.h"
12 #include "content/public/browser/android/ui_resource_android.h"
13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/gfx/android/java_bitmap.h"
15
16 namespace content {
17
18 class UIResourceAndroidImpl : public UIResourceAndroid {
19 public:
20 static scoped_ptr<UIResourceAndroidImpl> CreateFromJavaBitmap(
21 content::UIResourceProvider* provider,
22 jobject bitmap_object);
23
24 static scoped_ptr<UIResourceAndroidImpl> CreateFromJavaBitmap(
25 content::UIResourceProvider* provider,
26 const gfx::JavaBitmap& java_bitmap);
27
28 virtual ~UIResourceAndroidImpl();
29
30 // cc::UIResourceClient implementation.
31 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
32 bool resource_lost) override;
33
34 // content::UIResourceClientAndroid implementation.
35 void UIResourceIsInvalid() override;
36
37 cc::UIResourceId id() override;
38
39 private:
40 UIResourceAndroidImpl(content::UIResourceProvider* provider,
41 const SkBitmap& skbitmap);
42
43 content::UIResourceProvider* provider_;
44 SkBitmap bitmap_;
45 cc::UIResourceId id_;
46
47 DISALLOW_COPY_AND_ASSIGN(UIResourceAndroidImpl);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_ANDROID_UI_RESOURCE_ANDROID_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698