diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 00:06:09 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 00:06:09 +0000 |
commit | d3ba7727bab47266a43ba17790be43eaf4c7961f (patch) | |
tree | b796080c822c41b935fde0b37806f64d961abb2d /webkit | |
parent | 15730c45ebf0eb657ba30e19f643bfe1cf299ce7 (diff) | |
download | chromium_src-d3ba7727bab47266a43ba17790be43eaf4c7961f.zip chromium_src-d3ba7727bab47266a43ba17790be43eaf4c7961f.tar.gz chromium_src-d3ba7727bab47266a43ba17790be43eaf4c7961f.tar.bz2 |
Set the focus ring color to match the Gtk theme focus color.
BUG=8540
Review URL: http://codereview.chromium.org/173642
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webview.h | 4 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 9 | ||||
-rw-r--r-- | webkit/glue/webview_impl.h | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h index d451a1e..2d75798 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -258,6 +258,10 @@ class WebView : public WebKit::WebWidget { // Gets the WebView's active state (i.e., state of control tints). virtual bool IsActive() = 0; +#if defined(OS_LINUX) + virtual void SetThemeFocusRingColor(int r, int g, int b) = 0; +#endif + private: DISALLOW_COPY_AND_ASSIGN(WebView); }; diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index c295303..d5f9c06 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -44,6 +44,8 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "PopupMenuClient.h" #if defined(OS_WIN) #include "RenderThemeChromiumWin.h" +#elif defined(OS_LINUX) +#include "RenderThemeChromiumLinux.h" #else #include "RenderTheme.h" #endif @@ -1778,6 +1780,13 @@ bool WebViewImpl::IsActive() { : false; } +#if defined(OS_LINUX) +void WebViewImpl::SetThemeFocusRingColor(int r, int g, int b) { + reinterpret_cast<RenderThemeChromiumLinux*>(theme())-> + setFocusRingColor(Color(r, g, b)); +} +#endif + void WebViewImpl::DidCommitLoad(bool* is_new_navigation) { if (is_new_navigation) *is_new_navigation = observed_new_navigation_; diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h index 9161b1c..f16206e 100644 --- a/webkit/glue/webview_impl.h +++ b/webkit/glue/webview_impl.h @@ -144,6 +144,9 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> { virtual void SetActive(bool active); virtual bool IsActive(); +#if defined(OS_LINUX) + virtual void SetThemeFocusRingColor(int r, int g, int b); +#endif // WebViewImpl |