| 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 // TestShellWebTheme::Engine implements the WebThemeEngine | 5 // TestShellWebTheme::Engine implements the WebThemeEngine |
| 6 // API used by the Windows version of Chromium to render native form | 6 // API used by the Windows version of Chromium to render native form |
| 7 // controls like checkboxes, radio buttons, and scroll bars. The normal | 7 // controls like checkboxes, radio buttons, and scroll bars. The normal |
| 8 // implementation (native_theme) renders the controls using either the | 8 // implementation (native_theme) renders the controls using either the |
| 9 // UXTheme theming engine present in XP, Vista, and Win 7, or the "classic" | 9 // 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. | 10 // theme used if that theme is selected in the Desktop settings. |
| 11 // Unfortunately, both of these themes render controls differently on the | 11 // Unfortunately, both of these themes render controls differently on the |
| 12 // different versions of Windows. | 12 // different versions of Windows. |
| 13 // | 13 // |
| 14 // In order to ensure maximum consistency of baselines across the different | 14 // In order to ensure maximum consistency of baselines across the different |
| 15 // Windows versions, we provide a simple implementation for test_shell here | 15 // Windows versions, we provide a simple implementation for test_shell here |
| 16 // instead. These controls are actually platform-independent (they're rendered | 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 | 17 // using Skia) and could be used on Linux and the Mac as well, should we |
| 18 // choose to do so at some point. | 18 // choose to do so at some point. |
| 19 // | 19 // |
| 20 | 20 |
| 21 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBTHEMEENGINE_H_ | 21 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBTHEMEENGINE_H_ |
| 22 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBTHEMEENGINE_H_ | 22 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBTHEMEENGINE_H_ |
| 23 | 23 |
| 24 #include "base/basictypes.h" | 24 #include "base/basictypes.h" |
| 25 #include "webkit/api/public/win/WebThemeEngine.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/win/WebThemeEngine.h" |
| 26 | 26 |
| 27 namespace TestShellWebTheme { | 27 namespace TestShellWebTheme { |
| 28 | 28 |
| 29 class Engine : public WebKit::WebThemeEngine { | 29 class Engine : public WebKit::WebThemeEngine { |
| 30 public: | 30 public: |
| 31 Engine() {} | 31 Engine() {} |
| 32 | 32 |
| 33 // WebThemeEngine methods: | 33 // WebThemeEngine methods: |
| 34 virtual void paintButton( | 34 virtual void paintButton( |
| 35 WebKit::WebCanvas*, int part, int state, int classic_state, | 35 WebKit::WebCanvas*, int part, int state, int classic_state, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 55 const WebKit::WebRect&); | 55 const WebKit::WebRect&); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 DISALLOW_COPY_AND_ASSIGN(Engine); | 58 DISALLOW_COPY_AND_ASSIGN(Engine); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace TestShellWebTheme | 61 } // namespace TestShellWebTheme |
| 62 | 62 |
| 63 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBTHEMEENGINE_H_ | 63 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBTHEMEENGINE_H_ |
| 64 | 64 |
| OLD | NEW |