| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/api/public/WebCanvas.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" |
| 23 #include "webkit/api/public/WebRect.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/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 #ifndef CHECK_EQ | 27 #ifndef CHECK_EQ |
| 28 #define CHECK_EQ(a, b) CHECK((a) == (b)) | 28 #define CHECK_EQ(a, b) CHECK((a) == (b)) |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 // We define this for clarity, although there really should be a DFCS_NORMAL | 31 // We define this for clarity, although there really should be a DFCS_NORMAL |
| 32 // in winuser.h. | 32 // in winuser.h. |
| 33 namespace { | 33 namespace { |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 CHECK_EQ(classic_state, kDFCSNormal); | 527 CHECK_EQ(classic_state, kDFCSNormal); |
| 528 cstate = Control::kNormal_State; | 528 cstate = Control::kNormal_State; |
| 529 } else { | 529 } else { |
| 530 NOTREACHED(); | 530 NOTREACHED(); |
| 531 } | 531 } |
| 532 | 532 |
| 533 drawControl(canvas, rect, ctype, cstate); | 533 drawControl(canvas, rect, ctype, cstate); |
| 534 } | 534 } |
| 535 | 535 |
| 536 } // namespace TestShellWebTheme | 536 } // namespace TestShellWebTheme |
| OLD | NEW |