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

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

Issue 852433002: [Android] Upstream scene layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 11 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_STATIC_TAB_SCENE_LAYER_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_H_
7
8 #include <jni.h>
9
10 #include "base/android/jni_weak_ref.h"
11 #include "base/android/scoped_java_ref.h"
12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/browser/android/compositor/scene_layer/scene_layer.h"
16 #include "ui/gfx/geometry/point.h"
17 #include "ui/gfx/geometry/point_f.h"
18 #include "ui/gfx/geometry/size.h"
19 #include "ui/gfx/geometry/size_f.h"
20
21 namespace cc {
22 class Layer;
23 }
24
25 namespace chrome {
26 namespace android {
27
28 class ContentLayer;
29
30 class StaticTabSceneLayer : public SceneLayer {
31 public:
32 StaticTabSceneLayer(JNIEnv* env, jobject jobj);
33 virtual ~StaticTabSceneLayer();
34
35 void UpdateTabLayer(JNIEnv* env,
36 jobject jobj,
37 jfloat content_viewport_x,
38 jfloat content_viewport_y,
39 jfloat content_viewport_width,
40 jfloat content_viewport_height,
41 jobject jtab_content_manager,
42 jint id,
43 jint toolbar_resource_id,
44 jboolean can_use_live_layer,
45 jboolean can_use_ntp_fallback,
46 jint default_background_color,
47 jfloat x,
48 jfloat y,
49 jfloat width,
50 jfloat height,
51 jfloat content_offset_y,
52 jfloat static_to_view_blend,
53 jfloat saturation);
54
55 bool ShouldShowBackground() override;
56 SkColor GetBackgroundColor() override;
57
58 void SetContentTree(JNIEnv* env, jobject jobj, jobject jcontent_tree);
59
60 private:
61 scoped_refptr<chrome::android::ContentLayer> content_layer_;
62
63 int last_set_tab_id_;
64 int background_color_;
65
66 scoped_refptr<cc::Layer> contextual_content_tree_;
67
68 DISALLOW_COPY_AND_ASSIGN(StaticTabSceneLayer);
69 };
70
71 bool RegisterStaticTabSceneLayer(JNIEnv* env);
72
73 } // namespace android
74 } // namespace chrome
75
76 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_STATIC_TAB_SCENE_LAYER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698