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

Side by Side Diff: content/test/layout_tests/runner/WebTestThemeEngineWin.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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
OLDNEW
(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 /*
6 * Copyright (C) 2010 Google Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following disclaimer
16 * in the documentation and/or other materials provided with the
17 * distribution.
18 * * Neither the name of Google Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from
20 * this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 // This implements the WebThemeEngine API used by the Windows version of
36 // Chromium to render native form controls like checkboxes, radio buttons,
37 // and scroll bars.
38 // The normal implementation (native_theme) renders the controls using either
39 // the UXTheme theming engine present in XP, Vista, and Win 7, or the "classic"
40 // theme used if that theme is selected in the Desktop settings.
41 // Unfortunately, both of these themes render controls differently on the
42 // different versions of Windows.
43 //
44 // In order to ensure maximum consistency of baselines across the different
45 // Windows versions, we provide a simple implementation for DRT here
46 // instead. These controls are actually platform-independent (they're rendered
47 // using Skia) and could be used on Linux and the Mac as well, should we
48 // choose to do so at some point.
49 //
50
51 #ifndef WebTestThemeEngineWin_h
52 #define WebTestThemeEngineWin_h
53
54 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
55 #include "third_party/WebKit/public/platform/win/WebThemeEngine.h"
56
57 namespace WebTestRunner {
58
59 class WebTestThemeEngineWin : public blink::WebThemeEngine, public blink::WebNon Copyable {
60 public:
61 WebTestThemeEngineWin() { }
62 virtual ~WebTestThemeEngineWin() { }
63
64 // WebThemeEngine methods:
65 virtual void paintButton(
66 blink::WebCanvas*, int part, int state, int classicState,
67 const blink::WebRect&);
68
69 virtual void paintMenuList(
70 blink::WebCanvas*, int part, int state, int classicState,
71 const blink::WebRect&);
72
73 virtual void paintScrollbarArrow(
74 blink::WebCanvas*, int state, int classicState,
75 const blink::WebRect&);
76
77 virtual void paintScrollbarThumb(
78 blink::WebCanvas*, int part, int state, int classicState,
79 const blink::WebRect&);
80
81 virtual void paintScrollbarTrack(
82 blink::WebCanvas*, int part, int state, int classicState,
83 const blink::WebRect&, const blink::WebRect& alignRect);
84
85 virtual void paintSpinButton(
86 blink::WebCanvas*, int part, int state, int classicState,
87 const blink::WebRect&);
88
89 virtual void paintTextField(
90 blink::WebCanvas*, int part, int state, int classicState,
91 const blink::WebRect&, blink::WebColor, bool fillContentArea,
92 bool drawEdges);
93
94 virtual void paintTrackbar(
95 blink::WebCanvas*, int part, int state, int classicState,
96 const blink::WebRect&);
97
98 virtual void paintProgressBar(
99 blink::WebCanvas*, const blink::WebRect& barRect,
100 const blink::WebRect& valueRect,
101 bool determinate, double time);
102
103 virtual blink::WebSize getSize(int part);
104 };
105
106 }
107
108 #endif // WebTestThemeEngineWin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698