| 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/layer_title_cache.h" | 5 #include "chrome/browser/android/compositor/layer_title_cache.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "cc/layers/layer.h" | 11 #include "cc/layers/layer.h" |
| 12 #include "cc/layers/ui_resource_layer.h" | 12 #include "cc/layers/ui_resource_layer.h" |
| 13 #include "chrome/browser/android/compositor/decoration_title.h" | 13 #include "chrome/browser/android/compositor/decoration_title.h" |
| 14 #include "jni/LayerTitleCache_jni.h" | 14 #include "jni/LayerTitleCache_jni.h" |
| 15 #include "ui/android/resources/resource_manager.h" | 15 #include "ui/android/resources/resource_manager.h" |
| 16 #include "ui/gfx/android/java_bitmap.h" | 16 #include "ui/gfx/android/java_bitmap.h" |
| 17 #include "ui/gfx/geometry/point_f.h" | 17 #include "ui/gfx/geometry/point_f.h" |
| 18 #include "ui/gfx/geometry/rect_f.h" | 18 #include "ui/gfx/geometry/rect_f.h" |
| 19 #include "ui/gfx/geometry/size.h" | 19 #include "ui/gfx/geometry/size.h" |
| 20 | 20 |
| 21 using base::android::JavaParamRef; |
| 22 |
| 21 namespace chrome { | 23 namespace chrome { |
| 22 namespace android { | 24 namespace android { |
| 23 | 25 |
| 24 // static | 26 // static |
| 25 LayerTitleCache* LayerTitleCache::FromJavaObject(jobject jobj) { | 27 LayerTitleCache* LayerTitleCache::FromJavaObject(jobject jobj) { |
| 26 if (!jobj) | 28 if (!jobj) |
| 27 return NULL; | 29 return NULL; |
| 28 return reinterpret_cast<LayerTitleCache*>(Java_LayerTitleCache_getNativePtr( | 30 return reinterpret_cast<LayerTitleCache*>(Java_LayerTitleCache_getNativePtr( |
| 29 base::android::AttachCurrentThread(), jobj)); | 31 base::android::AttachCurrentThread(), jobj)); |
| 30 } | 32 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 jint spinner_resource_id, | 131 jint spinner_resource_id, |
| 130 jint spinner_incognito_resource_id) { | 132 jint spinner_incognito_resource_id) { |
| 131 LayerTitleCache* cache = new LayerTitleCache( | 133 LayerTitleCache* cache = new LayerTitleCache( |
| 132 env, obj, fade_width, favicon_start_padding, favicon_end_padding, | 134 env, obj, fade_width, favicon_start_padding, favicon_end_padding, |
| 133 spinner_resource_id, spinner_incognito_resource_id); | 135 spinner_resource_id, spinner_incognito_resource_id); |
| 134 return reinterpret_cast<intptr_t>(cache); | 136 return reinterpret_cast<intptr_t>(cache); |
| 135 } | 137 } |
| 136 | 138 |
| 137 } // namespace android | 139 } // namespace android |
| 138 } // namespace chrome | 140 } // namespace chrome |
| OLD | NEW |