OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This implements the WebThemeEngine API used by the Windows version of |
| 6 // Chromium to render native form controls like checkboxes, radio buttons, |
| 7 // and scroll bars. |
| 8 // The normal implementation (native_theme) renders the controls using either |
| 9 // the UXTheme theming engine present in XP, Vista, and Win 7, or the "classic" |
| 10 // theme used if that theme is selected in the Desktop settings. |
| 11 // Unfortunately, both of these themes render controls differently on the |
| 12 // different versions of Windows. |
| 13 // |
| 14 // In order to ensure maximum consistency of baselines across the different |
| 15 // Windows versions, we provide a simple implementation for DRT here |
| 16 // instead. These controls are actually platform-independent (they're rendered |
| 17 // using Skia) and could be used on Linux and the Mac as well, should we |
| 18 // choose to do so at some point. |
| 19 // |
| 20 |
| 21 #ifndef WebTestThemeEngineWin_h |
| 22 #define WebTestThemeEngineWin_h |
| 23 |
| 24 #include "third_party/WebKit/public/platform/WebNonCopyable.h" |
| 25 #include "third_party/WebKit/public/platform/win/WebThemeEngine.h" |
| 26 |
| 27 namespace WebTestRunner { |
| 28 |
| 29 class WebTestThemeEngineWin : public blink::WebThemeEngine, public blink::WebNon
Copyable { |
| 30 public: |
| 31 WebTestThemeEngineWin() { } |
| 32 virtual ~WebTestThemeEngineWin() { } |
| 33 |
| 34 // WebThemeEngine methods: |
| 35 virtual void paintButton( |
| 36 blink::WebCanvas*, int part, int state, int classicState, |
| 37 const blink::WebRect&); |
| 38 |
| 39 virtual void paintMenuList( |
| 40 blink::WebCanvas*, int part, int state, int classicState, |
| 41 const blink::WebRect&); |
| 42 |
| 43 virtual void paintScrollbarArrow( |
| 44 blink::WebCanvas*, int state, int classicState, |
| 45 const blink::WebRect&); |
| 46 |
| 47 virtual void paintScrollbarThumb( |
| 48 blink::WebCanvas*, int part, int state, int classicState, |
| 49 const blink::WebRect&); |
| 50 |
| 51 virtual void paintScrollbarTrack( |
| 52 blink::WebCanvas*, int part, int state, int classicState, |
| 53 const blink::WebRect&, const blink::WebRect& alignRect); |
| 54 |
| 55 virtual void paintSpinButton( |
| 56 blink::WebCanvas*, int part, int state, int classicState, |
| 57 const blink::WebRect&); |
| 58 |
| 59 virtual void paintTextField( |
| 60 blink::WebCanvas*, int part, int state, int classicState, |
| 61 const blink::WebRect&, blink::WebColor, bool fillContentArea, |
| 62 bool drawEdges); |
| 63 |
| 64 virtual void paintTrackbar( |
| 65 blink::WebCanvas*, int part, int state, int classicState, |
| 66 const blink::WebRect&); |
| 67 |
| 68 virtual void paintProgressBar( |
| 69 blink::WebCanvas*, const blink::WebRect& barRect, |
| 70 const blink::WebRect& valueRect, |
| 71 bool determinate, double time); |
| 72 |
| 73 virtual blink::WebSize getSize(int part); |
| 74 }; |
| 75 |
| 76 } |
| 77 |
| 78 #endif // WebTestThemeEngineWin_h |
OLD | NEW |