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

Side by Side Diff: chrome/browser/android/compositor/tab_content_manager.cc

Issue 1708763003: Fix strict mode violation in TabPersistentStore.cleanupPersistentData() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tab-persist-1
Patch Set: comments & rebase Created 4 years, 9 months 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
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 #include <stddef.h> 8 #include <stddef.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 void TabContentManager::RemoveTabThumbnail(JNIEnv* env, 322 void TabContentManager::RemoveTabThumbnail(JNIEnv* env,
323 const JavaParamRef<jobject>& obj, 323 const JavaParamRef<jobject>& obj,
324 jint tab_id) { 324 jint tab_id) {
325 TabReadbackRequestMap::iterator readback_iter = 325 TabReadbackRequestMap::iterator readback_iter =
326 pending_tab_readbacks_.find(tab_id); 326 pending_tab_readbacks_.find(tab_id);
327 if (readback_iter != pending_tab_readbacks_.end()) 327 if (readback_iter != pending_tab_readbacks_.end())
328 readback_iter->second->SetToDropAfterReadback(); 328 readback_iter->second->SetToDropAfterReadback();
329 thumbnail_cache_->Remove(tab_id); 329 thumbnail_cache_->Remove(tab_id);
330 } 330 }
331 331
332 void TabContentManager::RemoveTabThumbnailFromDiskAtAndAboveId(
333 JNIEnv* env,
334 const JavaParamRef<jobject>& obj,
335 jint min_forbidden_id) {
336 thumbnail_cache_->RemoveFromDiskAtAndAboveId(min_forbidden_id);
337 }
338
339 void TabContentManager::GetDecompressedThumbnail( 332 void TabContentManager::GetDecompressedThumbnail(
340 JNIEnv* env, 333 JNIEnv* env,
341 const JavaParamRef<jobject>& obj, 334 const JavaParamRef<jobject>& obj,
342 jint tab_id) { 335 jint tab_id) {
343 base::Callback<void(bool, SkBitmap)> decompress_done_callback = 336 base::Callback<void(bool, SkBitmap)> decompress_done_callback =
344 base::Bind(&TabContentManager::OnFinishDecompressThumbnail, 337 base::Bind(&TabContentManager::OnFinishDecompressThumbnail,
345 weak_factory_.GetWeakPtr(), reinterpret_cast<int>(tab_id)); 338 weak_factory_.GetWeakPtr(), reinterpret_cast<int>(tab_id));
346 thumbnail_cache_->DecompressThumbnailFromFile(reinterpret_cast<int>(tab_id), 339 thumbnail_cache_->DecompressThumbnailFromFile(reinterpret_cast<int>(tab_id),
347 decompress_done_callback); 340 decompress_done_callback);
348 } 341 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 jboolean use_approximation_thumbnail) { 380 jboolean use_approximation_thumbnail) {
388 TabContentManager* manager = new TabContentManager( 381 TabContentManager* manager = new TabContentManager(
389 env, obj, default_cache_size, approximation_cache_size, 382 env, obj, default_cache_size, approximation_cache_size,
390 compression_queue_max_size, write_queue_max_size, 383 compression_queue_max_size, write_queue_max_size,
391 use_approximation_thumbnail); 384 use_approximation_thumbnail);
392 return reinterpret_cast<intptr_t>(manager); 385 return reinterpret_cast<intptr_t>(manager);
393 } 386 }
394 387
395 } // namespace android 388 } // namespace android
396 } // namespace chrome 389 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/tab_content_manager.h ('k') | chrome/browser/android/thumbnail/thumbnail_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698