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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
11 #include "cc/layers/ui_resource_layer.h" | 11 #include "cc/layers/ui_resource_layer.h" |
12 #include "chrome/browser/android/compositor/decoration_title.h" | 12 #include "chrome/browser/android/compositor/decoration_title.h" |
13 #include "jni/LayerTitleCache_jni.h" | 13 #include "jni/LayerTitleCache_jni.h" |
14 #include "ui/android/resources/resource_manager.h" | 14 #include "ui/android/resources/resource_manager.h" |
15 #include "ui/gfx/android/java_bitmap.h" | 15 #include "ui/gfx/android/java_bitmap.h" |
| 16 #include "ui/gfx/geometry/rect_f.h" |
16 #include "ui/gfx/point_f.h" | 17 #include "ui/gfx/point_f.h" |
17 #include "ui/gfx/rect_f.h" | |
18 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
19 | 19 |
20 namespace chrome { | 20 namespace chrome { |
21 namespace android { | 21 namespace android { |
22 | 22 |
23 // static | 23 // static |
24 LayerTitleCache* LayerTitleCache::FromJavaObject(jobject jobj) { | 24 LayerTitleCache* LayerTitleCache::FromJavaObject(jobject jobj) { |
25 if (!jobj) | 25 if (!jobj) |
26 return NULL; | 26 return NULL; |
27 return reinterpret_cast<LayerTitleCache*>(Java_LayerTitleCache_getNativePtr( | 27 return reinterpret_cast<LayerTitleCache*>(Java_LayerTitleCache_getNativePtr( |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 jint spinner_resource_id, | 116 jint spinner_resource_id, |
117 jint spinner_incognito_resource_id) { | 117 jint spinner_incognito_resource_id) { |
118 LayerTitleCache* cache = new LayerTitleCache( | 118 LayerTitleCache* cache = new LayerTitleCache( |
119 env, obj, fade_width, favicon_start_padding, favicon_end_padding, | 119 env, obj, fade_width, favicon_start_padding, favicon_end_padding, |
120 spinner_resource_id, spinner_incognito_resource_id); | 120 spinner_resource_id, spinner_incognito_resource_id); |
121 return reinterpret_cast<intptr_t>(cache); | 121 return reinterpret_cast<intptr_t>(cache); |
122 } | 122 } |
123 | 123 |
124 } // namespace android | 124 } // namespace android |
125 } // namespace chrome | 125 } // namespace chrome |
OLD | NEW |