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

Side by Side Diff: ui/views/background.h

Issue 10823229: (Views only) Add a gradient background to the tabstrip of the view tabbed pane implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/background.cc » ('j') | ui/views/background.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_BACKGROUND_H_ 5 #ifndef UI_VIEWS_BACKGROUND_H_
6 #define UI_VIEWS_BACKGROUND_H_ 6 #define UI_VIEWS_BACKGROUND_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Creates a background that fills the canvas in the specified color. 52 // Creates a background that fills the canvas in the specified color.
53 static Background* CreateSolidBackground(int r, int g, int b, int a) { 53 static Background* CreateSolidBackground(int r, int g, int b, int a) {
54 return CreateSolidBackground(SkColorSetARGB(a, r, g, b)); 54 return CreateSolidBackground(SkColorSetARGB(a, r, g, b));
55 } 55 }
56 56
57 // Creates a background that contains a vertical gradient that varies 57 // Creates a background that contains a vertical gradient that varies
58 // from |color1| to |color2| 58 // from |color1| to |color2|
59 static Background* CreateVerticalGradientBackground(SkColor color1, 59 static Background* CreateVerticalGradientBackground(SkColor color1,
60 SkColor color2); 60 SkColor color2);
61 61
62 // Creates a background that contains a vertical gradient that varies from
63 // |color1| to |color2|. |start| and |end| specify the start and the end of
64 // the gradient. Both values are specified as percentage.
msw 2012/08/08 17:12:20 nit: consider "Both |start| and |end| range from 0
markusheintz_ 2012/08/08 21:53:55 obsolete
65 static Background* CreateVerticalGradientRangeBackground(
66 SkColor color1, SkColor color2, float start, float end);
msw 2012/08/08 17:12:20 nit: one param per line
markusheintz_ 2012/08/08 21:53:55 Done.
67
62 // Creates Chrome's standard panel background 68 // Creates Chrome's standard panel background
63 static Background* CreateStandardPanelBackground(); 69 static Background* CreateStandardPanelBackground();
64 70
65 // Creates a Background from the specified Painter. If owns_painter is 71 // Creates a Background from the specified Painter. If owns_painter is
66 // true, the Painter is deleted when the Border is deleted. 72 // true, the Painter is deleted when the Border is deleted.
67 static Background* CreateBackgroundPainter(bool owns_painter, 73 static Background* CreateBackgroundPainter(bool owns_painter,
68 Painter* painter); 74 Painter* painter);
69 75
70 // Render the background for the provided view 76 // Render the background for the provided view
71 virtual void Paint(gfx::Canvas* canvas, View* view) const = 0; 77 virtual void Paint(gfx::Canvas* canvas, View* view) const = 0;
(...skipping 21 matching lines...) Expand all
93 // TODO(port): Create portable replacement for HBRUSH. 99 // TODO(port): Create portable replacement for HBRUSH.
94 mutable HBRUSH native_control_brush_; 100 mutable HBRUSH native_control_brush_;
95 #endif // defined(OS_WIN) 101 #endif // defined(OS_WIN)
96 102
97 DISALLOW_COPY_AND_ASSIGN(Background); 103 DISALLOW_COPY_AND_ASSIGN(Background);
98 }; 104 };
99 105
100 } // namespace views 106 } // namespace views
101 107
102 #endif // UI_VIEWS_BACKGROUND_H_ 108 #endif // UI_VIEWS_BACKGROUND_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/background.cc » ('j') | ui/views/background.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698