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

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

Issue 191723003: Nukes USE_AURA ifdefs from views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback Created 6 years, 9 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 | « ui/views/accessible_pane_view_unittest.cc ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »
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 #include "ui/views/background.h" 5 #include "ui/views/background.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "skia/ext/skia_utils_win.h" 8 #include "skia/ext/skia_utils_win.h"
9 #include "third_party/skia/include/core/SkPaint.h" 9 #include "third_party/skia/include/core/SkPaint.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #endif 87 #endif
88 88
89 //static 89 //static
90 Background* Background::CreateSolidBackground(SkColor color) { 90 Background* Background::CreateSolidBackground(SkColor color) {
91 return new SolidBackground(color); 91 return new SolidBackground(color);
92 } 92 }
93 93
94 //static 94 //static
95 Background* Background::CreateStandardPanelBackground() { 95 Background* Background::CreateStandardPanelBackground() {
96 // TODO(beng): Should be in NativeTheme. 96 // TODO(beng): Should be in NativeTheme.
97 #if defined(USE_AURA)
98 return CreateSolidBackground(SK_ColorWHITE); 97 return CreateSolidBackground(SK_ColorWHITE);
99 #else
100 return CreateVerticalGradientBackground(SkColorSetRGB(246, 250, 255),
101 SkColorSetRGB(219, 235, 255));
102 #endif
103 } 98 }
104 99
105 //static 100 //static
106 Background* Background::CreateVerticalGradientBackground(SkColor color1, 101 Background* Background::CreateVerticalGradientBackground(SkColor color1,
107 SkColor color2) { 102 SkColor color2) {
108 Background* background = CreateBackgroundPainter( 103 Background* background = CreateBackgroundPainter(
109 true, Painter::CreateVerticalGradient(color1, color2)); 104 true, Painter::CreateVerticalGradient(color1, color2));
110 background->SetNativeControlColor( 105 background->SetNativeControlColor(
111 color_utils::AlphaBlend(color1, color2, 128)); 106 color_utils::AlphaBlend(color1, color2, 128));
112 107
(...skipping 13 matching lines...) Expand all
126 return background; 121 return background;
127 } 122 }
128 123
129 //static 124 //static
130 Background* Background::CreateBackgroundPainter(bool owns_painter, 125 Background* Background::CreateBackgroundPainter(bool owns_painter,
131 Painter* painter) { 126 Painter* painter) {
132 return new BackgroundPainter(owns_painter, painter); 127 return new BackgroundPainter(owns_painter, painter);
133 } 128 }
134 129
135 } // namespace views 130 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/accessible_pane_view_unittest.cc ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698