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 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ |
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // Returns the layer that represents the title of tab of tab_id. | 67 // Returns the layer that represents the title of tab of tab_id. |
68 // Returns NULL if no layer can be found. | 68 // Returns NULL if no layer can be found. |
69 DecorationTitle* GetTitleLayer(int tab_id); | 69 DecorationTitle* GetTitleLayer(int tab_id); |
70 | 70 |
71 void SetResourceManager(ui::ResourceManager* resource_manager); | 71 void SetResourceManager(ui::ResourceManager* resource_manager); |
72 | 72 |
73 private: | 73 private: |
74 virtual ~LayerTitleCache(); | 74 virtual ~LayerTitleCache(); |
75 | 75 |
76 IDMap<DecorationTitle, IDMapOwnPointer> layer_cache_; | 76 IDMap<std::unique_ptr<DecorationTitle>> layer_cache_; |
77 | 77 |
78 JavaObjectWeakGlobalRef weak_java_title_cache_; | 78 JavaObjectWeakGlobalRef weak_java_title_cache_; |
79 int fade_width_; | 79 int fade_width_; |
80 int favicon_start_padding_; | 80 int favicon_start_padding_; |
81 int favicon_end_padding_; | 81 int favicon_end_padding_; |
82 | 82 |
83 int spinner_resource_id_; | 83 int spinner_resource_id_; |
84 int spinner_incognito_resource_id_; | 84 int spinner_incognito_resource_id_; |
85 | 85 |
86 ui::ResourceManager* resource_manager_; | 86 ui::ResourceManager* resource_manager_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(LayerTitleCache); | 88 DISALLOW_COPY_AND_ASSIGN(LayerTitleCache); |
89 }; | 89 }; |
90 | 90 |
91 bool RegisterLayerTitleCache(JNIEnv* env); | 91 bool RegisterLayerTitleCache(JNIEnv* env); |
92 | 92 |
93 } // namespace android | 93 } // namespace android |
94 | 94 |
95 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ | 95 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ |
OLD | NEW |