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

Unified Diff: chrome/browser/android/compositor/layer/toolbar_layer.h

Issue 1417353003: Move UrlBar background drawing to CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix yusofo's nit Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/compositor/layer/toolbar_layer.h
diff --git a/chrome/browser/android/compositor/layer/toolbar_layer.h b/chrome/browser/android/compositor/layer/toolbar_layer.h
index ab9f93124a69856e7ff3cf19fc65d31f1ef1363f..7e8e8a2b44d6e492d49915e10f10b946b26850cc 100644
--- a/chrome/browser/android/compositor/layer/toolbar_layer.h
+++ b/chrome/browser/android/compositor/layer/toolbar_layer.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "cc/layers/nine_patch_layer.h"
#include "chrome/browser/android/compositor/layer/layer.h"
#include "ui/android/resources/resource_manager.h"
@@ -22,7 +23,8 @@ namespace android {
class ToolbarLayer : public Layer {
public:
- static scoped_refptr<ToolbarLayer> Create();
+ static scoped_refptr<ToolbarLayer> Create(
+ ui::ResourceManager* resource_manager);
// Implements Layer
scoped_refptr<cc::Layer> layer() override;
@@ -31,6 +33,8 @@ class ToolbarLayer : public Layer {
int toolbar_background_color,
bool anonymize,
int toolbar_textbox_background_color,
+ int url_bar_background_resource_id,
+ float url_bar_alpha,
bool show_debug,
float brightness);
@@ -46,12 +50,15 @@ class ToolbarLayer : public Layer {
int progress_bar_background_color);
protected:
- ToolbarLayer();
+ explicit ToolbarLayer(ui::ResourceManager* resource_manager);
~ToolbarLayer() override;
private:
+ ui::ResourceManager* resource_manager_;
David Trainor- moved to gerrit 2015/11/02 16:25:08 If we're going to save the resource manager, we mi
aurimas (slooooooooow) 2015/11/02 19:31:46 Done
+
scoped_refptr<cc::Layer> layer_;
scoped_refptr<cc::SolidColorLayer> toolbar_background_layer_;
+ scoped_refptr<cc::NinePatchLayer> url_bar_background_layer_;
scoped_refptr<cc::UIResourceLayer> bitmap_layer_;
scoped_refptr<cc::SolidColorLayer> progress_bar_layer_;
scoped_refptr<cc::SolidColorLayer> progress_bar_background_layer_;

Powered by Google App Engine
This is Rietveld 408576698