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/thumbnail/thumbnail.h" | 5 #include "chrome/browser/android/thumbnail/thumbnail.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
13 #include "third_party/skia/include/core/SkCanvas.h" | 13 #include "third_party/skia/include/core/SkCanvas.h" |
14 #include "ui/android/resources/ui_resource_provider.h" | 14 #include "ui/android/resources/ui_resource_provider.h" |
15 #include "ui/gfx/geometry/size_conversions.h" | 15 #include "ui/gfx/geometry/size_conversions.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 SkBitmap CreateSmallHolderBitmap() { | 19 SkBitmap CreateSmallHolderBitmap() { |
20 SkBitmap small_bitmap; | 20 SkBitmap small_bitmap; |
21 SkCanvas canvas(small_bitmap); | 21 SkCanvas canvas(small_bitmap); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void Thumbnail::DoInvalidate() { | 110 void Thumbnail::DoInvalidate() { |
111 if (thumbnail_delegate_) | 111 if (thumbnail_delegate_) |
112 thumbnail_delegate_->InvalidateCachedThumbnail(this); | 112 thumbnail_delegate_->InvalidateCachedThumbnail(this); |
113 } | 113 } |
114 | 114 |
115 void Thumbnail::ClearUIResourceId() { | 115 void Thumbnail::ClearUIResourceId() { |
116 if (ui_resource_id_ && ui_resource_provider_) | 116 if (ui_resource_id_ && ui_resource_provider_) |
117 ui_resource_provider_->DeleteUIResource(ui_resource_id_); | 117 ui_resource_provider_->DeleteUIResource(ui_resource_id_); |
118 ui_resource_id_ = 0; | 118 ui_resource_id_ = 0; |
119 } | 119 } |
OLD | NEW |