| 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 #include "chrome/browser/android/compositor/tab_content_manager.h" | 5 #include "chrome/browser/android/compositor/tab_content_manager.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 TabContentManager::TabContentManager(JNIEnv* env, | 130 TabContentManager::TabContentManager(JNIEnv* env, |
| 131 jobject obj, | 131 jobject obj, |
| 132 jstring disk_cache_path, | 132 jstring disk_cache_path, |
| 133 jint default_cache_size, | 133 jint default_cache_size, |
| 134 jint approximation_cache_size, | 134 jint approximation_cache_size, |
| 135 jint compression_queue_max_size, | 135 jint compression_queue_max_size, |
| 136 jint write_queue_max_size, | 136 jint write_queue_max_size, |
| 137 jboolean use_approximation_thumbnail) | 137 jboolean use_approximation_thumbnail) |
| 138 : weak_factory_(this), weak_java_tab_content_manager_(env, obj) { | 138 : weak_java_tab_content_manager_(env, obj), weak_factory_(this) { |
| 139 std::string disk_cache_path_str = | 139 std::string disk_cache_path_str = |
| 140 base::android::ConvertJavaStringToUTF8(env, disk_cache_path); | 140 base::android::ConvertJavaStringToUTF8(env, disk_cache_path); |
| 141 thumbnail_cache_ = make_scoped_ptr(new ThumbnailCache( | 141 thumbnail_cache_ = make_scoped_ptr(new ThumbnailCache( |
| 142 disk_cache_path_str, (size_t)default_cache_size, | 142 disk_cache_path_str, (size_t)default_cache_size, |
| 143 (size_t)approximation_cache_size, (size_t)compression_queue_max_size, | 143 (size_t)approximation_cache_size, (size_t)compression_queue_max_size, |
| 144 (size_t)write_queue_max_size, use_approximation_thumbnail)); | 144 (size_t)write_queue_max_size, use_approximation_thumbnail)); |
| 145 thumbnail_cache_->AddThumbnailStoreObserver(this); | 145 thumbnail_cache_->AddThumbnailStoreObserver(this); |
| 146 } | 146 } |
| 147 | 147 |
| 148 TabContentManager::~TabContentManager() { | 148 TabContentManager::~TabContentManager() { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 jboolean use_approximation_thumbnail) { | 384 jboolean use_approximation_thumbnail) { |
| 385 TabContentManager* manager = new TabContentManager( | 385 TabContentManager* manager = new TabContentManager( |
| 386 env, obj, disk_cache_path, default_cache_size, approximation_cache_size, | 386 env, obj, disk_cache_path, default_cache_size, approximation_cache_size, |
| 387 compression_queue_max_size, write_queue_max_size, | 387 compression_queue_max_size, write_queue_max_size, |
| 388 use_approximation_thumbnail); | 388 use_approximation_thumbnail); |
| 389 return reinterpret_cast<intptr_t>(manager); | 389 return reinterpret_cast<intptr_t>(manager); |
| 390 } | 390 } |
| 391 | 391 |
| 392 } // namespace android | 392 } // namespace android |
| 393 } // namespace chrome | 393 } // namespace chrome |
| OLD | NEW |