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

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

Issue 787023002: Upstream more layers, decoration title, layer_title_cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: upstream resources as well Created 6 years 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 2014 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_DECORATION_TITLE_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_DECORATION_TITLE_H_
7
8 #include <jni.h>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "cc/resources/ui_resource_client.h"
13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/gfx/size.h"
15 #include "ui/gfx/transform.h"
16
17 namespace cc {
18 class Layer;
19 class UIResourceLayer;
20 }
21
22 namespace content {
23 class UIResourceProvider;
Jaekyun Seok (inactive) 2014/12/11 01:31:04 This isn't used. Please remove it.
Changwan Ryu 2014/12/11 04:12:33 Done.
24 }
25
26 namespace ui {
27 class ResourceManager;
28 }
29
30 namespace chrome {
31 namespace android {
32
33 class LayerTitleCache;
34
35 class DecorationTitle {
36 public:
37 DecorationTitle(LayerTitleCache* layer_title_cache,
38 ui::ResourceManager* resource_manager,
39 int title_resource_id,
40 int favicon_resource_id,
41 int spinner_resource_id,
42 int spinner_resource_id_incognito,
43 int fade_width,
44 int favicon_start_padding,
45 int favicon_end_padding,
46 bool is_incognito,
47 bool is_rtl);
48 ~DecorationTitle();
49
50 void SetResourceManager(ui::ResourceManager* resource_manager);
51
52 void Update(int title_resource_id,
53 int favicon_resource_id,
54 int fade_width,
55 int favicon_start_padding,
56 int favicon_end_padding,
57 bool is_incognito,
58 bool is_rtl);
59 void SetUIResourceIds();
60 void SetIsLoading(bool is_loading);
61 void SetSpinnerRotation(float rotation);
62 void setBounds(const gfx::Size& bounds);
63 void setOpacity(float opacity);
64
65 scoped_refptr<cc::Layer> layer();
66 const gfx::Size& size() { return size_; }
67
68 private:
69 scoped_refptr<cc::Layer> layer_;
70 scoped_refptr<cc::UIResourceLayer> layer_opaque_;
71 scoped_refptr<cc::UIResourceLayer> layer_fade_;
72 scoped_refptr<cc::UIResourceLayer> layer_favicon_;
73
74 int title_resource_id_;
75 int favicon_resource_id_;
76 int spinner_resource_id_;
77 int spinner_incognito_resource_id_;
78
79 gfx::Size title_size_;
80 gfx::Size favicon_size_;
81 gfx::Size size_;
82 int fade_width_;
83 float spinner_rotation_;
84 int favicon_start_padding_;
85 int favicon_end_padding_;
86 bool is_incognito_;
87 bool is_rtl_;
88 bool is_loading_;
89 scoped_ptr<gfx::Transform> transform_;
90
91 ui::ResourceManager* resource_manager_;
92
93 LayerTitleCache* layer_title_cache_;
94
95 DISALLOW_COPY_AND_ASSIGN(DecorationTitle);
96 };
97
98 } // namespace android
99 } // namespace chrome
100
101 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_DECORATION_TITLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698