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

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

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Address aelias@'s review Created 3 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
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 "cc/paint/paint_canvas.h"
12 #include "third_party/skia/include/core/SkColor.h" 12 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/base/models/menu_separator_types.h" 13 #include "ui/base/models/menu_separator_types.h"
14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/geometry/size.h"
14 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
15 #include "ui/native_theme/native_theme_export.h" 17 #include "ui/native_theme/native_theme_export.h"
16 18
17 namespace gfx { 19 namespace gfx {
18 class Rect; 20 class Rect;
19 class Size; 21 class Size;
20 } 22 }
21 23
22 namespace ui { 24 namespace ui {
23 25
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Paint part during state transition, used for overlay scrollbar state 262 // Paint part during state transition, used for overlay scrollbar state
261 // transition animation. 263 // transition animation.
262 virtual void PaintStateTransition(cc::PaintCanvas* canvas, 264 virtual void PaintStateTransition(cc::PaintCanvas* canvas,
263 Part part, 265 Part part,
264 State startState, 266 State startState,
265 State endState, 267 State endState,
266 double progress, 268 double progress,
267 const gfx::Rect& rect, 269 const gfx::Rect& rect,
268 ScrollbarOverlayColorTheme theme) const {} 270 ScrollbarOverlayColorTheme theme) const {}
269 271
272 virtual bool SupportsNinePatch(Part part) const = 0;
sadrul 2017/03/01 15:38:55 Can you document this?
bokan 2017/03/01 16:22:45 Done.
273 virtual gfx::Size GetNinePatchCanvasSize(Part part) const = 0;
274 virtual gfx::Rect GetNinePatchAperture(Part part) const = 0;
275
270 // Supports theme specific colors. 276 // Supports theme specific colors.
271 void SetScrollbarColors(unsigned inactive_color, 277 void SetScrollbarColors(unsigned inactive_color,
272 unsigned active_color, 278 unsigned active_color,
273 unsigned track_color); 279 unsigned track_color);
274 280
275 // Colors for GetSystemColor(). 281 // Colors for GetSystemColor().
276 enum ColorId { 282 enum ColorId {
277 // Windows 283 // Windows
278 kColorId_WindowBackground, 284 kColorId_WindowBackground,
279 // Dialogs 285 // Dialogs
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 private: 421 private:
416 // Observers to notify when the native theme changes. 422 // Observers to notify when the native theme changes.
417 base::ObserverList<NativeThemeObserver> native_theme_observers_; 423 base::ObserverList<NativeThemeObserver> native_theme_observers_;
418 424
419 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 425 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
420 }; 426 };
421 427
422 } // namespace ui 428 } // namespace ui
423 429
424 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 430 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698