OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/android/testshell/tab_manager.h" | 5 #include "chrome/android/testshell/tab_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "chrome/browser/android/tab_base_android_impl.h" | 14 #include "chrome/browser/android/tab_base_android_impl.h" |
15 #include "content/public/browser/android/content_view_layer_renderer.h" | 15 #include "content/public/browser/android/content_view_layer_renderer.h" |
16 #include "jni/TabManager_jni.h" | 16 #include "jni/TabManager_jni.h" |
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" | |
18 | 17 |
19 #include <android/native_window_jni.h> | 18 #include <android/native_window_jni.h> |
20 | 19 |
21 using base::android::ScopedJavaLocalRef; | 20 using base::android::ScopedJavaLocalRef; |
22 using content::ContentViewLayerRenderer; | 21 using content::ContentViewLayerRenderer; |
23 | 22 |
24 namespace chrome { | 23 namespace chrome { |
25 | 24 |
26 // Register native methods | 25 // Register native methods |
27 bool RegisterTabManager(JNIEnv* env) { | 26 bool RegisterTabManager(JNIEnv* env) { |
(...skipping 12 matching lines...) Expand all Loading... |
40 static void HideTab(JNIEnv* env, jclass clazz, jint jtab, | 39 static void HideTab(JNIEnv* env, jclass clazz, jint jtab, |
41 jint j_content_view_layer_renderer) { | 40 jint j_content_view_layer_renderer) { |
42 TabBaseAndroidImpl* tab = reinterpret_cast<TabBaseAndroidImpl*>(jtab); | 41 TabBaseAndroidImpl* tab = reinterpret_cast<TabBaseAndroidImpl*>(jtab); |
43 ContentViewLayerRenderer* content_view_layer_renderer = | 42 ContentViewLayerRenderer* content_view_layer_renderer = |
44 reinterpret_cast<ContentViewLayerRenderer*>( | 43 reinterpret_cast<ContentViewLayerRenderer*>( |
45 j_content_view_layer_renderer); | 44 j_content_view_layer_renderer); |
46 content_view_layer_renderer->DetachLayer(tab->tab_layer()); | 45 content_view_layer_renderer->DetachLayer(tab->tab_layer()); |
47 } | 46 } |
48 | 47 |
49 } // namespace chrome | 48 } // namespace chrome |
OLD | NEW |