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

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

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
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_
7
8 #include <vector>
9
10 #include "base/android/jni_android.h"
11 #include "base/android/jni_weak_ref.h"
12 #include "base/android/scoped_java_ref.h"
13 #include "base/basictypes.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "cc/layers/layer.h"
16 #include "cc/layers/ui_resource_layer.h"
17 #include "chrome/browser/android/compositor/scene_layer/scene_layer.h"
18
19 namespace cc {
20 class SolidColorLayer;
21 }
22
23 namespace chrome {
24 namespace android {
25
26 class LayerTitleCache;
27 class TabHandleLayer;
28
29 class TabStripSceneLayer : public SceneLayer {
30 public:
31 TabStripSceneLayer(JNIEnv* env, jobject jobj);
32 ~TabStripSceneLayer() override;
33
34 void SetContentTree(JNIEnv* env, jobject jobj, jobject jcontent_tree);
35
36 void BeginBuildingFrame(JNIEnv* env, jobject jobj);
37 void FinishBuildingFrame(JNIEnv* env, jobject jobj);
38
39 void UpdateTabStripLayer(JNIEnv* env,
40 jobject jobj,
41 jfloat width,
42 jfloat height,
43 jfloat y_offset,
44 jfloat strip_brightness);
45 void UpdateNewTabButton(JNIEnv* env,
46 jobject jobj,
47 jint resource_id,
48 jfloat x,
49 jfloat y,
50 jfloat width,
51 jfloat height,
52 jboolean visible,
53 jobject jresource_manager);
54 void UpdateModelSelectorButton(JNIEnv* env,
55 jobject jobj,
56 jint resource_id,
57 jfloat x,
58 jfloat y,
59 jfloat width,
60 jfloat height,
61 jboolean incognito,
62 jboolean visible,
63 jobject jresource_manager);
64 void PutStripTabLayer(JNIEnv* env,
65 jobject jobj,
66 jint id,
67 jint close_resource_id,
68 jint handle_resource_id,
69 jboolean foreground,
70 jboolean close_pressed,
71 jfloat toolbar_width,
72 jfloat x,
73 jfloat y,
74 jfloat width,
75 jfloat height,
76 jfloat content_offset_x,
77 jfloat close_button_alpha,
78 jboolean is_loading,
79 jfloat spinner_rotation,
80 jfloat border_opacity,
81 jobject jlayer_title_cache,
82 jobject jresource_manager);
83
84 private:
85 scoped_refptr<TabHandleLayer> GetNextLayer(
86 LayerTitleCache* layer_title_cache);
87
88 typedef std::vector<scoped_refptr<TabHandleLayer>> TabHandleLayerList;
89
90 scoped_refptr<cc::SolidColorLayer> background_layer_;
91 scoped_refptr<cc::UIResourceLayer> new_tab_button_;
92 scoped_refptr<cc::UIResourceLayer> model_selector_button_;
93
94 float strip_brightness_;
95 unsigned write_index_;
96 TabHandleLayerList tab_handle_layers_;
97 SceneLayer* content_tree_;
98
99 DISALLOW_COPY_AND_ASSIGN(TabStripSceneLayer);
100 };
101
102 bool RegisterTabStripSceneLayer(JNIEnv* env);
103
104 } // namespace android
105 } // namespace chrome
106
107 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_TAB_STRIP_SCENE_LAYER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698