Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1532)

Side by Side Diff: chrome/browser/android/compositor/layer_title_cache.h

Issue 2320623003: Move title creation logic to native (Closed)
Patch Set: don't trigger creation inside of GetTitleLayer Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 jint favicon_resource_id); 63 jint favicon_resource_id);
64 64
65 void ClearExcept(JNIEnv* env, 65 void ClearExcept(JNIEnv* env,
66 const base::android::JavaParamRef<jobject>& obj, 66 const base::android::JavaParamRef<jobject>& obj,
67 jint except_id); 67 jint except_id);
68 68
69 // Returns the layer that represents the title of tab of tab_id. 69 // Returns the layer that represents the title of tab of tab_id.
70 // Returns NULL if no layer can be found. 70 // Returns NULL if no layer can be found.
71 DecorationTitle* GetTitleLayer(int tab_id); 71 DecorationTitle* GetTitleLayer(int tab_id);
72 72
73 // Trigger the creation of a new title layer if one does not exist.
74 void BuildTitleLayer(int tab_id);
75
73 void SetResourceManager(ui::ResourceManager* resource_manager); 76 void SetResourceManager(ui::ResourceManager* resource_manager);
74 77
75 private: 78 private:
76 virtual ~LayerTitleCache(); 79 virtual ~LayerTitleCache();
77 80
78 IDMap<DecorationTitle, IDMapOwnPointer> layer_cache_; 81 IDMap<DecorationTitle, IDMapOwnPointer> layer_cache_;
79 82
80 JavaObjectWeakGlobalRef weak_java_title_cache_; 83 JavaObjectWeakGlobalRef weak_java_title_cache_;
81 int fade_width_; 84 int fade_width_;
82 int favicon_start_padding_; 85 int favicon_start_padding_;
83 int favicon_end_padding_; 86 int favicon_end_padding_;
84 87
85 int spinner_resource_id_; 88 int spinner_resource_id_;
86 int spinner_incognito_resource_id_; 89 int spinner_incognito_resource_id_;
87 90
88 ui::ResourceManager* resource_manager_; 91 ui::ResourceManager* resource_manager_;
89 92
90 DISALLOW_COPY_AND_ASSIGN(LayerTitleCache); 93 DISALLOW_COPY_AND_ASSIGN(LayerTitleCache);
91 }; 94 };
92 95
93 bool RegisterLayerTitleCache(JNIEnv* env); 96 bool RegisterLayerTitleCache(JNIEnv* env);
94 97
95 } // namespace android 98 } // namespace android
96 } // namespace chrome 99 } // namespace chrome
97 100
98 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_ 101 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TITLE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698