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

Unified Diff: ui/views/background.h

Issue 2637383003: Change Painter factory functions to unique_ptr (Closed)
Patch Set: msw review Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | ui/views/background.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/background.h
diff --git a/ui/views/background.h b/ui/views/background.h
index d00418ad453e0a627ce73ded999cce11522f36ab..c89185d5806b0314907f70f4d482fe4d64e8f7d1 100644
--- a/ui/views/background.h
+++ b/ui/views/background.h
@@ -7,6 +7,8 @@
#include <stddef.h>
+#include <memory>
+
#include "base/macros.h"
#include "build/build_config.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -60,22 +62,11 @@ class VIEWS_EXPORT Background {
static Background* CreateVerticalGradientBackground(SkColor color1,
SkColor color2);
- // Creates a background that contains a vertical gradient. The gradient can
- // have multiple |colors|. The |pos| array contains the relative positions of
- // each corresponding color. |colors| and |pos| must be the same size. The
- // first element in |pos| must be 0.0 and the last element must be 1.0.
- // |count| contains the number of elements in |colors| and |pos|.
- static Background* CreateVerticalMultiColorGradientBackground(SkColor* colors,
- SkScalar* pos,
- size_t count);
-
// Creates Chrome's standard panel background
static Background* CreateStandardPanelBackground();
- // Creates a Background from the specified Painter. If owns_painter is
- // true, the Painter is deleted when the Border is deleted.
- static Background* CreateBackgroundPainter(bool owns_painter,
- Painter* painter);
+ // Creates a Background from the specified Painter.
+ static Background* CreateBackgroundPainter(std::unique_ptr<Painter> painter);
// Render the background for the provided view
virtual void Paint(gfx::Canvas* canvas, View* view) const = 0;
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | ui/views/background.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698