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

Side by Side Diff: chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.h

Issue 1836453003: Use a scrollable tab strip on tablets at small widths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tiny bit of clean up Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H_ 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 23 matching lines...) Expand all
34 ~TabStripSceneLayer() override; 34 ~TabStripSceneLayer() override;
35 35
36 void SetContentTree( 36 void SetContentTree(
37 JNIEnv* env, 37 JNIEnv* env,
38 const base::android::JavaParamRef<jobject>& jobj, 38 const base::android::JavaParamRef<jobject>& jobj,
39 const base::android::JavaParamRef<jobject>& jcontent_tree); 39 const base::android::JavaParamRef<jobject>& jcontent_tree);
40 40
41 void BeginBuildingFrame(JNIEnv* env, 41 void BeginBuildingFrame(JNIEnv* env,
42 const base::android::JavaParamRef<jobject>& jobj, 42 const base::android::JavaParamRef<jobject>& jobj,
43 jboolean visible); 43 jboolean visible);
44
44 void FinishBuildingFrame(JNIEnv* env, 45 void FinishBuildingFrame(JNIEnv* env,
45 const base::android::JavaParamRef<jobject>& jobj); 46 const base::android::JavaParamRef<jobject>& jobj);
46 47
47 void UpdateTabStripLayer(JNIEnv* env, 48 void UpdateTabStripLayer(JNIEnv* env,
48 const base::android::JavaParamRef<jobject>& jobj, 49 const base::android::JavaParamRef<jobject>& jobj,
49 jfloat width, 50 jfloat width,
50 jfloat height, 51 jfloat height,
51 jfloat y_offset, 52 jfloat y_offset,
52 jfloat background_tab_brightness, 53 jfloat background_tab_brightness,
53 jfloat brightness, 54 jfloat brightness,
54 jboolean should_readd_background); 55 jboolean should_readd_background);
56
55 void UpdateNewTabButton( 57 void UpdateNewTabButton(
56 JNIEnv* env, 58 JNIEnv* env,
57 const base::android::JavaParamRef<jobject>& jobj, 59 const base::android::JavaParamRef<jobject>& jobj,
58 jint resource_id, 60 jint resource_id,
59 jfloat x, 61 jfloat x,
60 jfloat y, 62 jfloat y,
61 jfloat width, 63 jfloat width,
62 jfloat height, 64 jfloat height,
63 jboolean visible, 65 jboolean visible,
64 const base::android::JavaParamRef<jobject>& jresource_manager); 66 const base::android::JavaParamRef<jobject>& jresource_manager);
67
65 void UpdateModelSelectorButton( 68 void UpdateModelSelectorButton(
66 JNIEnv* env, 69 JNIEnv* env,
67 const base::android::JavaParamRef<jobject>& jobj, 70 const base::android::JavaParamRef<jobject>& jobj,
68 jint resource_id, 71 jint resource_id,
69 jfloat x, 72 jfloat x,
70 jfloat y, 73 jfloat y,
71 jfloat width, 74 jfloat width,
72 jfloat height, 75 jfloat height,
73 jboolean incognito, 76 jboolean incognito,
74 jboolean visible, 77 jboolean visible,
75 const base::android::JavaParamRef<jobject>& jresource_manager); 78 const base::android::JavaParamRef<jobject>& jresource_manager);
79
80 void UpdateTabStripLeftFade(
81 JNIEnv* env,
82 const base::android::JavaParamRef<jobject>& jobj,
83 jint resource_id,
84 jfloat opacity,
85 const base::android::JavaParamRef<jobject>& jresource_manager);
86
87 void UpdateTabStripRightFade(
88 JNIEnv* env,
89 const base::android::JavaParamRef<jobject>& jobj,
90 jint resource_id,
91 jfloat opacity,
92 const base::android::JavaParamRef<jobject>& jresource_manager);
93
76 void PutStripTabLayer( 94 void PutStripTabLayer(
77 JNIEnv* env, 95 JNIEnv* env,
78 const base::android::JavaParamRef<jobject>& jobj, 96 const base::android::JavaParamRef<jobject>& jobj,
79 jint id, 97 jint id,
80 jint close_resource_id, 98 jint close_resource_id,
81 jint handle_resource_id, 99 jint handle_resource_id,
82 jboolean foreground, 100 jboolean foreground,
83 jboolean close_pressed, 101 jboolean close_pressed,
84 jfloat toolbar_width, 102 jfloat toolbar_width,
85 jfloat x, 103 jfloat x,
86 jfloat y, 104 jfloat y,
87 jfloat width, 105 jfloat width,
88 jfloat height, 106 jfloat height,
89 jfloat content_offset_x, 107 jfloat content_offset_x,
90 jfloat close_button_alpha, 108 jfloat close_button_alpha,
91 jboolean is_loading, 109 jboolean is_loading,
92 jfloat spinner_rotation, 110 jfloat spinner_rotation,
93 jfloat border_opacity, 111 jfloat border_opacity,
94 const base::android::JavaParamRef<jobject>& jlayer_title_cache, 112 const base::android::JavaParamRef<jobject>& jlayer_title_cache,
95 const base::android::JavaParamRef<jobject>& jresource_manager); 113 const base::android::JavaParamRef<jobject>& jresource_manager);
96 114
97 private: 115 private:
98 scoped_refptr<TabHandleLayer> GetNextLayer( 116 scoped_refptr<TabHandleLayer> GetNextLayer(
99 LayerTitleCache* layer_title_cache); 117 LayerTitleCache* layer_title_cache);
100 118
101 typedef std::vector<scoped_refptr<TabHandleLayer>> TabHandleLayerList; 119 typedef std::vector<scoped_refptr<TabHandleLayer>> TabHandleLayerList;
102 120
103 scoped_refptr<cc::SolidColorLayer> tab_strip_layer_; 121 scoped_refptr<cc::SolidColorLayer> tab_strip_layer_;
122 scoped_refptr<cc::Layer> scrollable_strip_layer_;
104 scoped_refptr<cc::UIResourceLayer> new_tab_button_; 123 scoped_refptr<cc::UIResourceLayer> new_tab_button_;
124 scoped_refptr<cc::UIResourceLayer> left_fade_;
125 scoped_refptr<cc::UIResourceLayer> right_fade_;
105 scoped_refptr<cc::UIResourceLayer> model_selector_button_; 126 scoped_refptr<cc::UIResourceLayer> model_selector_button_;
106 127
107 float background_tab_brightness_; 128 float background_tab_brightness_;
108 float brightness_; 129 float brightness_;
109 unsigned write_index_; 130 unsigned write_index_;
110 TabHandleLayerList tab_handle_layers_; 131 TabHandleLayerList tab_handle_layers_;
111 SceneLayer* content_tree_; 132 SceneLayer* content_tree_;
112 133
113 DISALLOW_COPY_AND_ASSIGN(TabStripSceneLayer); 134 DISALLOW_COPY_AND_ASSIGN(TabStripSceneLayer);
114 }; 135 };
115 136
116 bool RegisterTabStripSceneLayer(JNIEnv* env); 137 bool RegisterTabStripSceneLayer(JNIEnv* env);
117 138
118 } // namespace android 139 } // namespace android
119 } // namespace chrome 140 } // namespace chrome
120 141
121 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H _ 142 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698