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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Clean up comments, fix mac build 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 unified diff | Download patch
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_NATIVE_THEME_NATIVE_THEME_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "cc/paint/paint_canvas.h"
11 #include "third_party/skia/include/core/SkColor.h" 12 #include "third_party/skia/include/core/SkColor.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 #include "ui/native_theme/native_theme_export.h" 14 #include "ui/native_theme/native_theme_export.h"
14 15
15 class SkCanvas;
16
17 namespace gfx { 16 namespace gfx {
18 class Rect; 17 class Rect;
19 class Size; 18 class Size;
20 } 19 }
21 20
22 namespace ui { 21 namespace ui {
23 22
24 class NativeThemeObserver; 23 class NativeThemeObserver;
25 24
26 // This class supports drawing UI controls (like buttons, text fields, lists, 25 // This class supports drawing UI controls (like buttons, text fields, lists,
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 TextFieldExtraParams text_field; 220 TextFieldExtraParams text_field;
222 TrackbarExtraParams trackbar; 221 TrackbarExtraParams trackbar;
223 }; 222 };
224 223
225 // Return the size of the part. 224 // Return the size of the part.
226 virtual gfx::Size GetPartSize(Part part, 225 virtual gfx::Size GetPartSize(Part part,
227 State state, 226 State state,
228 const ExtraParams& extra) const = 0; 227 const ExtraParams& extra) const = 0;
229 228
230 // Paint the part to the canvas. 229 // Paint the part to the canvas.
231 virtual void Paint(SkCanvas* canvas, 230 virtual void Paint(cc::PaintCanvas* canvas,
232 Part part, 231 Part part,
233 State state, 232 State state,
234 const gfx::Rect& rect, 233 const gfx::Rect& rect,
235 const ExtraParams& extra) const = 0; 234 const ExtraParams& extra) const = 0;
236 235
237 // Paint part during state transition, used for overlay scrollbar state 236 // Paint part during state transition, used for overlay scrollbar state
238 // transition animation. 237 // transition animation.
239 virtual void PaintStateTransition(SkCanvas* canvas, 238 virtual void PaintStateTransition(cc::PaintCanvas* canvas,
240 Part part, 239 Part part,
241 State startState, 240 State startState,
242 State endState, 241 State endState,
243 double progress, 242 double progress,
244 const gfx::Rect& rect, 243 const gfx::Rect& rect,
245 ScrollbarOverlayColorTheme theme) const {} 244 ScrollbarOverlayColorTheme theme) const {}
246 245
247 // Supports theme specific colors. 246 // Supports theme specific colors.
248 void SetScrollbarColors(unsigned inactive_color, 247 void SetScrollbarColors(unsigned inactive_color,
249 unsigned active_color, 248 unsigned active_color,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 private: 388 private:
390 // Observers to notify when the native theme changes. 389 // Observers to notify when the native theme changes.
391 base::ObserverList<NativeThemeObserver> native_theme_observers_; 390 base::ObserverList<NativeThemeObserver> native_theme_observers_;
392 391
393 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 392 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
394 }; 393 };
395 394
396 } // namespace ui 395 } // namespace ui
397 396
398 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 397 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698