| OLD | NEW |
| 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 CHROME_BROWSER_ANDROID_COMPOSITOR_TAB_CONTENT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_TAB_CONTENT_MANAGER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_TAB_CONTENT_MANAGER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_TAB_CONTENT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 jint min_forbidden_id); | 92 jint min_forbidden_id); |
| 93 void GetDecompressedThumbnail(JNIEnv* env, jobject obj, jint tab_id); | 93 void GetDecompressedThumbnail(JNIEnv* env, jobject obj, jint tab_id); |
| 94 | 94 |
| 95 // ThumbnailCacheObserver implementation; | 95 // ThumbnailCacheObserver implementation; |
| 96 void OnFinishedThumbnailRead(TabId tab_id) override; | 96 void OnFinishedThumbnailRead(TabId tab_id) override; |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 class TabReadbackRequest; | 99 class TabReadbackRequest; |
| 100 typedef base::hash_map<int, scoped_refptr<cc::Layer>> LayerMap; | 100 typedef base::hash_map<int, scoped_refptr<cc::Layer>> LayerMap; |
| 101 typedef base::hash_map<int, scoped_refptr<ThumbnailLayer>> ThumbnailLayerMap; | 101 typedef base::hash_map<int, scoped_refptr<ThumbnailLayer>> ThumbnailLayerMap; |
| 102 typedef base::ScopedPtrHashMap<int, TabReadbackRequest> TabReadbackRequestMap; | 102 typedef base::ScopedPtrHashMap<int, scoped_ptr<TabReadbackRequest>> |
| 103 TabReadbackRequestMap; |
| 103 | 104 |
| 104 void PutThumbnailIntoCache(int tab_id, | 105 void PutThumbnailIntoCache(int tab_id, |
| 105 float thumbnail_scale, | 106 float thumbnail_scale, |
| 106 const SkBitmap& bitmap); | 107 const SkBitmap& bitmap); |
| 107 | 108 |
| 108 scoped_ptr<ThumbnailCache> thumbnail_cache_; | 109 scoped_ptr<ThumbnailCache> thumbnail_cache_; |
| 109 ThumbnailLayerMap static_layer_cache_; | 110 ThumbnailLayerMap static_layer_cache_; |
| 110 LayerMap live_layer_list_; | 111 LayerMap live_layer_list_; |
| 111 TabReadbackRequestMap pending_tab_readbacks_; | 112 TabReadbackRequestMap pending_tab_readbacks_; |
| 112 | 113 |
| 113 JavaObjectWeakGlobalRef weak_java_tab_content_manager_; | 114 JavaObjectWeakGlobalRef weak_java_tab_content_manager_; |
| 114 base::WeakPtrFactory<TabContentManager> weak_factory_; | 115 base::WeakPtrFactory<TabContentManager> weak_factory_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(TabContentManager); | 117 DISALLOW_COPY_AND_ASSIGN(TabContentManager); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 bool RegisterTabContentManager(JNIEnv* env); | 120 bool RegisterTabContentManager(JNIEnv* env); |
| 120 | 121 |
| 121 } // namespace android | 122 } // namespace android |
| 122 } // namespace chrome | 123 } // namespace chrome |
| 123 | 124 |
| 124 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_TAB_CONTENT_MANAGER_H_ | 125 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_TAB_CONTENT_MANAGER_H_ |
| OLD | NEW |