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

Side by Side Diff: ui/base/native_theme/native_theme.h

Issue 10310136: ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 8 years, 7 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/DEPS ('k') | ui/base/native_theme/native_theme.cc » ('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 #ifndef UI_GFX_NATIVE_THEME_H_ 5 #ifndef UI_BASE_NATIVE_THEME_NATIVE_THEME_H_
6 #define UI_GFX_NATIVE_THEME_H_ 6 #define UI_BASE_NATIVE_THEME_NATIVE_THEME_H_
7 #pragma once 7 #pragma once
8 8
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 class SkCanvas; 13 class SkCanvas;
14 14
15 namespace gfx { 15 namespace gfx {
16
17 class Rect; 16 class Rect;
18 class Size; 17 class Size;
18 }
19
20 namespace ui {
19 21
20 // This class supports drawing UI controls (like buttons, text fields, lists, 22 // This class supports drawing UI controls (like buttons, text fields, lists,
21 // comboboxes, etc) that look like the native UI controls of the underlying 23 // comboboxes, etc) that look like the native UI controls of the underlying
22 // platform, such as Windows or Linux. It also supplies default colors for 24 // platform, such as Windows or Linux. It also supplies default colors for
23 // dialog box backgrounds, etc., which are obtained from the system theme where 25 // dialog box backgrounds, etc., which are obtained from the system theme where
24 // possible. 26 // possible.
25 // 27 //
26 // The supported control types are listed in the Part enum. These parts can be 28 // The supported control types are listed in the Part enum. These parts can be
27 // in any state given by the State enum, where the actual definition of the 29 // in any state given by the State enum, where the actual definition of the
28 // state is part-specific. The supported colors are listed in the ColorId enum. 30 // state is part-specific. The supported colors are listed in the ColorId enum.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 ProgressBarExtraParams progress_bar; 193 ProgressBarExtraParams progress_bar;
192 ScrollbarArrowExtraParams scrollbar_arrow; 194 ScrollbarArrowExtraParams scrollbar_arrow;
193 ScrollbarTrackExtraParams scrollbar_track; 195 ScrollbarTrackExtraParams scrollbar_track;
194 ScrollbarThumbExtraParams scrollbar_thumb; 196 ScrollbarThumbExtraParams scrollbar_thumb;
195 SliderExtraParams slider; 197 SliderExtraParams slider;
196 TextFieldExtraParams text_field; 198 TextFieldExtraParams text_field;
197 TrackbarExtraParams trackbar; 199 TrackbarExtraParams trackbar;
198 }; 200 };
199 201
200 // Return the size of the part. 202 // Return the size of the part.
201 virtual Size GetPartSize(Part part, 203 virtual gfx::Size GetPartSize(Part part,
202 State state, 204 State state,
203 const ExtraParams& extra) const = 0; 205 const ExtraParams& extra) const = 0;
204 206
205 // Paint the part to the canvas. 207 // Paint the part to the canvas.
206 virtual void Paint(SkCanvas* canvas, 208 virtual void Paint(SkCanvas* canvas,
207 Part part, 209 Part part,
208 State state, 210 State state,
209 const gfx::Rect& rect, 211 const gfx::Rect& rect,
210 const ExtraParams& extra) const = 0; 212 const ExtraParams& extra) const = 0;
211 213
212 // Supports theme specific colors. 214 // Supports theme specific colors.
213 void SetScrollbarColors(unsigned inactive_color, 215 void SetScrollbarColors(unsigned inactive_color,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 NativeTheme() {} 261 NativeTheme() {}
260 virtual ~NativeTheme() {} 262 virtual ~NativeTheme() {}
261 263
262 static unsigned int thumb_inactive_color_; 264 static unsigned int thumb_inactive_color_;
263 static unsigned int thumb_active_color_; 265 static unsigned int thumb_active_color_;
264 static unsigned int track_color_; 266 static unsigned int track_color_;
265 267
266 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 268 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
267 }; 269 };
268 270
269 } // namespace gfx 271 } // namespace ui
270 272
271 #endif // UI_GFX_NATIVE_THEME_H_ 273 #endif // UI_BASE_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW
« no previous file with comments | « ui/DEPS ('k') | ui/base/native_theme/native_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698