OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/android/compositor/compositor_view.h" | 5 #include "chrome/browser/android/compositor/compositor_view.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include <android/bitmap.h> | 9 #include <android/bitmap.h> |
10 #include <android/native_window_jni.h> | 10 #include <android/native_window_jni.h> |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "third_party/skia/include/core/SkBitmap.h" | 34 #include "third_party/skia/include/core/SkBitmap.h" |
35 #include "ui/android/resources/resource_manager.h" | 35 #include "ui/android/resources/resource_manager.h" |
36 #include "ui/android/resources/ui_resource_provider.h" | 36 #include "ui/android/resources/ui_resource_provider.h" |
37 #include "ui/android/window_android.h" | 37 #include "ui/android/window_android.h" |
38 #include "ui/gfx/android/java_bitmap.h" | 38 #include "ui/gfx/android/java_bitmap.h" |
39 | 39 |
40 namespace chrome { | 40 namespace chrome { |
41 namespace android { | 41 namespace android { |
42 | 42 |
43 jlong Init(JNIEnv* env, | 43 jlong Init(JNIEnv* env, |
44 jobject obj, | 44 const JavaParamRef<jobject>& obj, |
45 jboolean low_mem_device, | 45 jboolean low_mem_device, |
46 jint empty_background_color, | 46 jint empty_background_color, |
47 jlong native_window_android, | 47 jlong native_window_android, |
48 jobject jlayer_title_cache, | 48 const JavaParamRef<jobject>& jlayer_title_cache, |
49 jobject jtab_content_manager) { | 49 const JavaParamRef<jobject>& jtab_content_manager) { |
50 CompositorView* view; | 50 CompositorView* view; |
51 ui::WindowAndroid* window_android = | 51 ui::WindowAndroid* window_android = |
52 reinterpret_cast<ui::WindowAndroid*>(native_window_android); | 52 reinterpret_cast<ui::WindowAndroid*>(native_window_android); |
53 LayerTitleCache* layer_title_cache = | 53 LayerTitleCache* layer_title_cache = |
54 LayerTitleCache::FromJavaObject(jlayer_title_cache); | 54 LayerTitleCache::FromJavaObject(jlayer_title_cache); |
55 TabContentManager* tab_content_manager = | 55 TabContentManager* tab_content_manager = |
56 TabContentManager::FromJavaObject(jtab_content_manager); | 56 TabContentManager::FromJavaObject(jtab_content_manager); |
57 | 57 |
58 DCHECK(tab_content_manager); | 58 DCHECK(tab_content_manager); |
59 | 59 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 // through here but through BrowserChildProcessHostDisconnected() instead. | 322 // through here but through BrowserChildProcessHostDisconnected() instead. |
323 } | 323 } |
324 | 324 |
325 // Register native methods | 325 // Register native methods |
326 bool RegisterCompositorView(JNIEnv* env) { | 326 bool RegisterCompositorView(JNIEnv* env) { |
327 return RegisterNativesImpl(env); | 327 return RegisterNativesImpl(env); |
328 } | 328 } |
329 | 329 |
330 } // namespace android | 330 } // namespace android |
331 } // namespace chrome | 331 } // namespace chrome |
OLD | NEW |