| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file implements a simple generic version of the WebKitThemeEngine, | 5 // This file implements a simple generic version of the WebKitThemeEngine, |
| 6 // Since WebThemeEngine is unfortunately defined in terms of the Windows | 6 // Since WebThemeEngine is unfortunately defined in terms of the Windows |
| 7 // Theme parameters and values, we need to translate all the values into | 7 // Theme parameters and values, we need to translate all the values into |
| 8 // generic equivalents that we can more easily understand. This file does | 8 // generic equivalents that we can more easily understand. This file does |
| 9 // that translation (acting as a Facade design pattern) and then uses | 9 // that translation (acting as a Facade design pattern) and then uses |
| 10 // TestShellWebTheme::Control for the actual rendering of the widgets. | 10 // TestShellWebTheme::Control for the actual rendering of the widgets. |
| 11 // | 11 // |
| 12 | 12 |
| 13 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" | 13 #include "webkit/tools/test_shell/test_shell_webthemeengine.h" |
| 14 | 14 |
| 15 // Although all this code is generic, we include these headers | 15 // Although all this code is generic, we include these headers |
| 16 // to pull in the Windows #defines for the parts and states of | 16 // to pull in the Windows #defines for the parts and states of |
| 17 // the controls. | 17 // the controls. |
| 18 #include <vsstyle.h> | 18 #include <vsstyle.h> |
| 19 #include <windows.h> | 19 #include <windows.h> |
| 20 | 20 |
| 21 #include "base/logging.h" | 21 #include "base/logging.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
| 24 #include "webkit/tools/test_shell/test_shell_webthemecontrol.h" | 24 #include "webkit/tools/test_shell/test_shell_webthemecontrol.h" |
| 25 #include "third_party/skia/include/core/SkRect.h" | 25 #include "third_party/skia/include/core/SkRect.h" |
| 26 | 26 |
| 27 // We define this for clarity, although there really should be a DFCS_NORMAL | 27 // We define this for clarity, although there really should be a DFCS_NORMAL |
| 28 // in winuser.h. | 28 // in winuser.h. |
| 29 namespace { | 29 namespace { |
| 30 const int kDFCSNormal = 0x0000; | 30 const int kDFCSNormal = 0x0000; |
| 31 } | 31 } |
| 32 | 32 |
| 33 using WebKit::WebCanvas; | 33 using WebKit::WebCanvas; |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 const WebKit::WebRect& barRect, | 563 const WebKit::WebRect& barRect, |
| 564 const WebKit::WebRect& valueRect, | 564 const WebKit::WebRect& valueRect, |
| 565 bool determinate, double) { | 565 bool determinate, double) { |
| 566 Control::Type ctype = Control::kProgressBar_Type; | 566 Control::Type ctype = Control::kProgressBar_Type; |
| 567 Control::State cstate = | 567 Control::State cstate = |
| 568 determinate ? Control::kNormal_State : Control::kIndeterminate_State; | 568 determinate ? Control::kNormal_State : Control::kIndeterminate_State; |
| 569 drawProgressBar(canvas, ctype, cstate, barRect, valueRect); | 569 drawProgressBar(canvas, ctype, cstate, barRect, valueRect); |
| 570 } | 570 } |
| 571 | 571 |
| 572 } // namespace TestShellWebTheme | 572 } // namespace TestShellWebTheme |
| OLD | NEW |