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" |
11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
14 #include "cc/layers/layer.h" | 14 #include "cc/layers/layer.h" |
15 #include "chrome/browser/android/compositor/layer/thumbnail_layer.h" | 15 #include "chrome/browser/android/compositor/layer/thumbnail_layer.h" |
16 #include "chrome/browser/android/tab_android.h" | 16 #include "chrome/browser/android/tab_android.h" |
17 #include "chrome/browser/android/thumbnail/thumbnail.h" | 17 #include "chrome/browser/android/thumbnail/thumbnail.h" |
18 #include "content/public/browser/android/content_view_core.h" | 18 #include "content/public/browser/android/content_view_core.h" |
19 #include "content/public/browser/readback_types.h" | 19 #include "content/public/browser/readback_types.h" |
20 #include "content/public/browser/render_view_host.h" | 20 #include "content/public/browser/render_view_host.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "jni/TabContentManager_jni.h" | 22 #include "jni/TabContentManager_jni.h" |
23 #include "ui/android/resources/ui_resource_provider.h" | 23 #include "ui/android/resources/ui_resource_provider.h" |
24 #include "ui/gfx/android/java_bitmap.h" | 24 #include "ui/gfx/android/java_bitmap.h" |
25 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/geometry/rect.h" |
26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 const size_t kMaxReadbacks = 1; | 30 const size_t kMaxReadbacks = 1; |
31 typedef base::Callback<void(float, const SkBitmap&)> TabReadbackCallback; | 31 typedef base::Callback<void(float, const SkBitmap&)> TabReadbackCallback; |
32 | 32 |
33 } // namespace | 33 } // namespace |
34 | 34 |
35 namespace chrome { | 35 namespace chrome { |
(...skipping 348 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 |