summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-04 08:42:23 +0000
committerrolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-04 08:42:23 +0000
commit824958e8d563d60c3a0019adbeeeaaa3f3c0a402 (patch)
tree6d12dc1bfd6882924893c878a30c2176c688f76f
parente8c87ee8c5f63cf2b753e5c178ef8a75e78c1233 (diff)
downloadchromium_src-824958e8d563d60c3a0019adbeeeaaa3f3c0a402.zip
chromium_src-824958e8d563d60c3a0019adbeeeaaa3f3c0a402.tar.gz
chromium_src-824958e8d563d60c3a0019adbeeeaaa3f3c0a402.tar.bz2
Add support for WebThemeEngine to webkit_support
BUG=45708 TEST=none Review URL: http://codereview.chromium.org/2571001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48907 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/support/webkit_support.cc26
-rw-r--r--webkit/support/webkit_support.h7
2 files changed, 33 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 5a22040..c594fad 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -59,6 +59,17 @@ class TestEnvironment {
WebKit::WebKitClient* webkit_client() { return webkit_client_.get(); }
+#if defined(OS_WIN)
+ void set_theme_engine(WebKit::WebThemeEngine* engine) {
+ DCHECK(webkit_client_ != 0);
+ webkit_client_->SetThemeEngine(engine);
+ }
+
+ WebKit::WebThemeEngine* theme_engine() {
+ return webkit_client_->themeEngine();
+ }
+#endif
+
private:
scoped_ptr<base::AtExitManager> at_exit_manager_;
scoped_ptr<MessageLoopForUI> main_message_loop_;
@@ -292,4 +303,19 @@ void SetAcceptAllCookies(bool accept) {
SimpleResourceLoaderBridge::SetAcceptAllCookies(accept);
}
+// Theme engine
+#if defined(OS_WIN)
+
+void SetThemeEngine(WebKit::WebThemeEngine* engine) {
+ DCHECK(test_environment);
+ test_environment->set_theme_engine(engine);
+}
+
+WebKit::WebThemeEngine* GetThemeEngine() {
+ DCHECK(test_environment);
+ return test_environment->theme_engine();
+}
+
+#endif
+
} // namespace webkit_support
diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h
index bfc87f0..179c5c1 100644
--- a/webkit/support/webkit_support.h
+++ b/webkit/support/webkit_support.h
@@ -19,6 +19,7 @@ class WebMediaPlayer;
class WebMediaPlayerClient;
class WebPlugin;
class WebString;
+class WebThemeEngine;
class WebURL;
struct WebPluginParams;
}
@@ -97,6 +98,12 @@ void ClearAllDatabases();
// - Resource loader
void SetAcceptAllCookies(bool accept);
+// - Theme engine
+#if defined(OS_WIN)
+void SetThemeEngine(WebKit::WebThemeEngine* engine);
+WebKit::WebThemeEngine* GetThemeEngine();
+#endif
+
} // namespace webkit_support
#endif // WEBKIT_SUPPORT_WEBIT_CLIENT_IMPL_H_