diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-17 20:50:22 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-17 20:50:22 +0000 |
commit | 4c5813a2cdc5b998bfcbb5cf9ca4a4e982893706 (patch) | |
tree | 57a580e2966a0d562707f204d829d794c32d82cf | |
parent | f6820ba92b1bd5f3f44cbedb116e8593dd6e5968 (diff) | |
download | chromium_src-4c5813a2cdc5b998bfcbb5cf9ca4a4e982893706.zip chromium_src-4c5813a2cdc5b998bfcbb5cf9ca4a4e982893706.tar.gz chromium_src-4c5813a2cdc5b998bfcbb5cf9ca4a4e982893706.tar.bz2 |
move webkit/glue/webthemeengine to webkit/child/
R=jamesr@chromium.org, sky@chromium.org
BUG=239107
Review URL: https://codereview.chromium.org/17284002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206793 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/child/DEPS | 2 | ||||
-rw-r--r-- | webkit/child/webfallbackthemeengine_impl.cc (renamed from webkit/glue/webfallbackthemeengine_impl.cc) | 2 | ||||
-rw-r--r-- | webkit/child/webfallbackthemeengine_impl.h (renamed from webkit/glue/webfallbackthemeengine_impl.h) | 6 | ||||
-rw-r--r-- | webkit/child/webkitplatformsupport_child_impl.cc | 11 | ||||
-rw-r--r-- | webkit/child/webkitplatformsupport_child_impl.h | 17 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_android.cc (renamed from webkit/glue/webthemeengine_impl_android.cc) | 2 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_android.h (renamed from webkit/glue/webthemeengine_impl_android.h) | 6 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_default.cc (renamed from webkit/glue/webthemeengine_impl_default.cc) | 2 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_default.h (renamed from webkit/glue/webthemeengine_impl_default.h) | 6 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_mac.cc (renamed from webkit/glue/webthemeengine_impl_mac.cc) | 2 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_mac.h (renamed from webkit/glue/webthemeengine_impl_mac.h) | 6 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_win.cc (renamed from webkit/glue/webthemeengine_impl_win.cc) | 2 | ||||
-rw-r--r-- | webkit/child/webthemeengine_impl_win.h (renamed from webkit/glue/webthemeengine_impl_win.h) | 6 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.gypi | 67 | ||||
-rw-r--r-- | webkit/glue/webkitplatformsupport_impl.cc | 10 | ||||
-rw-r--r-- | webkit/glue/webkitplatformsupport_impl.h | 15 |
16 files changed, 77 insertions, 85 deletions
diff --git a/webkit/child/DEPS b/webkit/child/DEPS index b15a790..552b168 100644 --- a/webkit/child/DEPS +++ b/webkit/child/DEPS @@ -1,3 +1,5 @@ include_rules = [
"+jni", # Needed for Android's java-generated bindings.
+ "+ui/base",
+ "+ui/native_theme",
]
diff --git a/webkit/glue/webfallbackthemeengine_impl.cc b/webkit/child/webfallbackthemeengine_impl.cc index 6a7319e..e381ec3 100644 --- a/webkit/glue/webfallbackthemeengine_impl.cc +++ b/webkit/child/webfallbackthemeengine_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/glue/webfallbackthemeengine_impl.h" +#include "webkit/child/webfallbackthemeengine_impl.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/public/platform/WebRect.h" diff --git a/webkit/glue/webfallbackthemeengine_impl.h b/webkit/child/webfallbackthemeengine_impl.h index fbdcb8c..947d43d 100644 --- a/webkit/glue/webfallbackthemeengine_impl.h +++ b/webkit/child/webfallbackthemeengine_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_GLUE_WEBFALLBACKTHEMEENGINE_IMPL_H_ -#define WEBKIT_GLUE_WEBFALLBACKTHEMEENGINE_IMPL_H_ +#ifndef WEBKIT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_ +#define WEBKIT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_ #include "base/memory/scoped_ptr.h" #include "third_party/WebKit/public/platform/WebFallbackThemeEngine.h" @@ -36,4 +36,4 @@ class WebFallbackThemeEngineImpl : public WebKit::WebFallbackThemeEngine { } // namespace webkit_glue -#endif // WEBKIT_GLUE_WEBFALLBACKTHEMEENGINE_IMPL_H_ +#endif // WEBKIT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_ diff --git a/webkit/child/webkitplatformsupport_child_impl.cc b/webkit/child/webkitplatformsupport_child_impl.cc index 9eb20c1..02ee5aa 100644 --- a/webkit/child/webkitplatformsupport_child_impl.cc +++ b/webkit/child/webkitplatformsupport_child_impl.cc @@ -13,6 +13,9 @@ #include "webkit/child/fling_animator_impl_android.h" #endif +using WebKit::WebFallbackThemeEngine; +using WebKit::WebThemeEngine; + namespace webkit_glue { WebKitPlatformSupportChildImpl::WebKitPlatformSupportChildImpl() @@ -21,6 +24,14 @@ WebKitPlatformSupportChildImpl::WebKitPlatformSupportChildImpl() WebKitPlatformSupportChildImpl::~WebKitPlatformSupportChildImpl() {} +WebThemeEngine* WebKitPlatformSupportChildImpl::themeEngine() { + return &native_theme_engine_; +} + +WebFallbackThemeEngine* WebKitPlatformSupportChildImpl::fallbackThemeEngine() { + return &fallback_theme_engine_; +} + void WebKitPlatformSupportChildImpl::SetFlingCurveParameters( const std::vector<float>& new_touchpad, const std::vector<float>& new_touchscreen) { diff --git a/webkit/child/webkitplatformsupport_child_impl.h b/webkit/child/webkitplatformsupport_child_impl.h index 1b18ebd..21812b2 100644 --- a/webkit/child/webkitplatformsupport_child_impl.h +++ b/webkit/child/webkitplatformsupport_child_impl.h @@ -6,9 +6,20 @@ #define WEBKIT_CHILD_WEBKITPLATFORMSUPPORT_CHILD_IMPL_H_ #include "base/threading/thread_local_storage.h" +#include "webkit/child/webfallbackthemeengine_impl.h" #include "webkit/child/webkit_child_export.h" #include "webkit/glue/webkitplatformsupport_impl.h" +#if defined(USE_DEFAULT_RENDER_THEME) +#include "webkit/child/webthemeengine_impl_default.h" +#elif defined(OS_WIN) +#include "webkit/child/webthemeengine_impl_win.h" +#elif defined(OS_MACOSX) +#include "webkit/child/webthemeengine_impl_mac.h" +#elif defined(OS_ANDROID) +#include "webkit/child/webthemeengine_impl_android.h" +#endif + namespace webkit_glue { class FlingCurveConfiguration; @@ -19,6 +30,10 @@ class WEBKIT_CHILD_EXPORT WebKitPlatformSupportChildImpl : WebKitPlatformSupportChildImpl(); virtual ~WebKitPlatformSupportChildImpl(); + // Platform methods (partial implementation): + virtual WebKit::WebThemeEngine* themeEngine(); + virtual WebKit::WebFallbackThemeEngine* fallbackThemeEngine(); + void SetFlingCurveParameters( const std::vector<float>& new_touchpad, const std::vector<float>& new_touchscreen); @@ -39,6 +54,8 @@ class WEBKIT_CHILD_EXPORT WebKitPlatformSupportChildImpl : private: static void DestroyCurrentThread(void*); + WebThemeEngineImpl native_theme_engine_; + WebFallbackThemeEngineImpl fallback_theme_engine_; base::ThreadLocalStorage::Slot current_thread_slot_; scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; }; diff --git a/webkit/glue/webthemeengine_impl_android.cc b/webkit/child/webthemeengine_impl_android.cc index ee46493..da139e5 100644 --- a/webkit/glue/webthemeengine_impl_android.cc +++ b/webkit/child/webthemeengine_impl_android.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/glue/webthemeengine_impl_android.h" +#include "webkit/child/webthemeengine_impl_android.h" #include "base/logging.h" #include "skia/ext/platform_canvas.h" diff --git a/webkit/glue/webthemeengine_impl_android.h b/webkit/child/webthemeengine_impl_android.h index e2b071e..f475611 100644 --- a/webkit/glue/webthemeengine_impl_android.h +++ b/webkit/child/webthemeengine_impl_android.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_ANDROID_H_ -#define WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_ANDROID_H_ +#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_ +#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_ #include "third_party/WebKit/public/platform/android/WebThemeEngine.h" @@ -23,4 +23,4 @@ class WebThemeEngineImpl : public WebKit::WebThemeEngine { } // namespace webkit_glue -#endif // WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_ANDROID_H_ +#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_ diff --git a/webkit/glue/webthemeengine_impl_default.cc b/webkit/child/webthemeengine_impl_default.cc index 9be9ea8..fc64094 100644 --- a/webkit/glue/webthemeengine_impl_default.cc +++ b/webkit/child/webthemeengine_impl_default.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/glue/webthemeengine_impl_default.h" +#include "webkit/child/webthemeengine_impl_default.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/public/platform/WebRect.h" diff --git a/webkit/glue/webthemeengine_impl_default.h b/webkit/child/webthemeengine_impl_default.h index df97812..2afaa7b 100644 --- a/webkit/glue/webthemeengine_impl_default.h +++ b/webkit/child/webthemeengine_impl_default.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_DEFAULT_H_ -#define WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_DEFAULT_H_ +#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ +#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ #include "third_party/WebKit/public/platform/default/WebThemeEngine.h" @@ -23,4 +23,4 @@ class WebThemeEngineImpl : public WebKit::WebThemeEngine { } // namespace webkit_glue -#endif // WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_DEFAULT_H_ +#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_ diff --git a/webkit/glue/webthemeengine_impl_mac.cc b/webkit/child/webthemeengine_impl_mac.cc index c640bd6..9852502 100644 --- a/webkit/glue/webthemeengine_impl_mac.cc +++ b/webkit/child/webthemeengine_impl_mac.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/glue/webthemeengine_impl_mac.h" +#include "webkit/child/webthemeengine_impl_mac.h" #include <Carbon/Carbon.h> diff --git a/webkit/glue/webthemeengine_impl_mac.h b/webkit/child/webthemeengine_impl_mac.h index 1d952cc..77c6598 100644 --- a/webkit/glue/webthemeengine_impl_mac.h +++ b/webkit/child/webthemeengine_impl_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_MAC_H_ -#define WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_MAC_H_ +#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_ +#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_ #include "third_party/WebKit/public/platform/mac/WebThemeEngine.h" @@ -22,4 +22,4 @@ class WebThemeEngineImpl : public WebKit::WebThemeEngine { } // namespace webkit_glue -#endif // WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_MAC_H_ +#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_ diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/child/webthemeengine_impl_win.cc index c4dde227..e4d05b3 100644 --- a/webkit/glue/webthemeengine_impl_win.cc +++ b/webkit/child/webthemeengine_impl_win.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/glue/webthemeengine_impl_win.h" +#include "webkit/child/webthemeengine_impl_win.h" #include <vsstyle.h> // To convert to ui::NativeTheme::State diff --git a/webkit/glue/webthemeengine_impl_win.h b/webkit/child/webthemeengine_impl_win.h index 8635cc8..860a111 100644 --- a/webkit/glue/webthemeengine_impl_win.h +++ b/webkit/child/webthemeengine_impl_win.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_WIN_H_ -#define WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_WIN_H_ +#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_ +#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_ #include "third_party/WebKit/public/platform/win/WebThemeEngine.h" @@ -46,4 +46,4 @@ class WebThemeEngineImpl : public WebKit::WebThemeEngine { } // namespace webkit_glue -#endif // WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_WIN_H_ +#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_ diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 8ac783e..0af16f2 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -65,7 +65,9 @@ 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink', + '<(DEPTH)/ui/native_theme/native_theme.gyp:native_theme', '<(DEPTH)/ui/ui.gyp:ui', # TODO(scottmg): crbug.com/237249 @@ -84,9 +86,19 @@ '../child/fling_curve_configuration.h', '../child/touch_fling_gesture_curve.cc', '../child/touch_fling_gesture_curve.h', + '../child/webfallbackthemeengine_impl.cc', + '../child/webfallbackthemeengine_impl.h', '../child/webkit_child_export.h', '../child/webkitplatformsupport_child_impl.cc', '../child/webkitplatformsupport_child_impl.h', + '../child/webthemeengine_impl_android.cc', + '../child/webthemeengine_impl_android.h', + '../child/webthemeengine_impl_default.cc', + '../child/webthemeengine_impl_default.h', + '../child/webthemeengine_impl_mac.cc', + '../child/webthemeengine_impl_mac.h', + '../child/webthemeengine_impl_win.cc', + '../child/webthemeengine_impl_win.h', '../child/webthread_impl.cc', '../child/webthread_impl.h', '../child/worker_task_runner.cc', @@ -94,6 +106,19 @@ ], 'conditions': [ + ['use_default_render_theme==0', { + 'sources/': [ + ['exclude', 'webthemeengine_impl_default.cc'], + ['exclude', 'webthemeengine_impl_default.h'], + ], + }], + ['OS=="mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', + ], + }, + }], ['OS=="android"', { 'dependencies': [ 'overscroller_jni_headers', @@ -220,7 +245,6 @@ '<(DEPTH)/third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', '<(DEPTH)/ui/gl/gl.gyp:gl', - '<(DEPTH)/ui/native_theme/native_theme.gyp:native_theme', '<(DEPTH)/ui/ui.gyp:ui', '<(DEPTH)/ui/ui.gyp:ui_resources', '<(DEPTH)/url/url.gyp:url_lib', @@ -269,8 +293,6 @@ 'webclipboard_impl.h', 'webcookie.cc', 'webcookie.h', - 'webfallbackthemeengine_impl.cc', - 'webfallbackthemeengine_impl.h', 'webfileutilities_impl.cc', 'webfileutilities_impl.h', 'webkit_glue.cc', @@ -284,14 +306,6 @@ 'websocketstreamhandle_delegate.h', 'websocketstreamhandle_impl.cc', 'websocketstreamhandle_impl.h', - 'webthemeengine_impl_android.cc', - 'webthemeengine_impl_android.h', - 'webthemeengine_impl_default.cc', - 'webthemeengine_impl_default.h', - 'webthemeengine_impl_mac.cc', - 'webthemeengine_impl_mac.h', - 'webthemeengine_impl_win.cc', - 'webthemeengine_impl_win.h', 'weburlloader_impl.cc', 'weburlloader_impl.h', ], @@ -300,17 +314,6 @@ # own hard dependencies. 'hard_dependency': 1, 'conditions': [ - ['use_default_render_theme==0', { - 'sources/': [ - ['exclude', 'webthemeengine_impl_default.cc'], - ['exclude', 'webthemeengine_impl_default.h'], - ], - }, { # else: use_default_render_theme==1 - 'sources/': [ - ['exclude', 'webthemeengine_impl_win.cc'], - ['exclude', 'webthemeengine_impl_win.h'], - ], - }], ['toolkit_uses_gtk == 1', { 'dependencies': [ '<(DEPTH)/build/linux/system.gyp:gtk', @@ -322,25 +325,7 @@ 'libraries': [ '-lXcursor', ], }, }], - ['OS!="mac"', { - 'sources/': [['exclude', '_mac\\.(cc|mm)$']], - 'sources!': [ - 'webthemeengine_impl_mac.cc', - ], - }, { # else: OS=="mac" - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', - ], - }, - }], - ['OS!="win"', { - 'sources/': [['exclude', '_win\\.cc$']], - 'sources!': [ - 'webthemeengine_impl_win.cc', - ], - }, { # else: OS=="win" - 'sources/': [['exclude', '_posix\\.cc$']], + ['OS=="win"', { 'include_dirs': [ '<(DEPTH)/third_party/wtl/include', ], diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc index 466c4c9..8a150fa 100644 --- a/webkit/glue/webkitplatformsupport_impl.cc +++ b/webkit/glue/webkitplatformsupport_impl.cc @@ -56,12 +56,10 @@ using WebKit::WebAudioBus; using WebKit::WebCookie; using WebKit::WebData; -using WebKit::WebFallbackThemeEngine; using WebKit::WebLocalizedString; using WebKit::WebPluginListBuilder; using WebKit::WebString; using WebKit::WebSocketStreamHandle; -using WebKit::WebThemeEngine; using WebKit::WebURL; using WebKit::WebURLError; using WebKit::WebURLLoader; @@ -369,14 +367,6 @@ WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() { } -WebThemeEngine* WebKitPlatformSupportImpl::themeEngine() { - return &native_theme_engine_; -} - -WebFallbackThemeEngine* WebKitPlatformSupportImpl::fallbackThemeEngine() { - return &fallback_theme_engine_; -} - WebURLLoader* WebKitPlatformSupportImpl::createURLLoader() { return new WebURLLoaderImpl(this); } diff --git a/webkit/glue/webkitplatformsupport_impl.h b/webkit/glue/webkitplatformsupport_impl.h index a56c2b1..75400b8 100644 --- a/webkit/glue/webkitplatformsupport_impl.h +++ b/webkit/glue/webkitplatformsupport_impl.h @@ -13,17 +13,9 @@ #include "third_party/WebKit/public/platform/WebURLError.h" #include "ui/base/layout.h" #include "webkit/glue/resource_loader_bridge.h" -#include "webkit/glue/webfallbackthemeengine_impl.h" #include "webkit/glue/webkit_glue_export.h" -#if defined(USE_DEFAULT_RENDER_THEME) -#include "webkit/glue/webthemeengine_impl_default.h" -#elif defined(OS_WIN) -#include "webkit/glue/webthemeengine_impl_win.h" -#elif defined(OS_MACOSX) -#include "webkit/glue/webthemeengine_impl_mac.h" -#elif defined(OS_ANDROID) -#include "webkit/glue/webthemeengine_impl_android.h" +#if defined(OS_ANDROID) #include "webkit/renderer/media/audio_decoder.h" #endif @@ -51,9 +43,6 @@ class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : virtual ~WebKitPlatformSupportImpl(); // Platform methods (partial implementation): - virtual WebKit::WebThemeEngine* themeEngine(); - virtual WebKit::WebFallbackThemeEngine* fallbackThemeEngine(); - virtual base::PlatformFile databaseOpenFile( const WebKit::WebString& vfs_file_name, int desired_flags); virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, @@ -172,8 +161,6 @@ class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : double shared_timer_fire_time_; bool shared_timer_fire_time_was_set_while_suspended_; int shared_timer_suspended_; // counter - WebThemeEngineImpl native_theme_engine_; - WebFallbackThemeEngineImpl fallback_theme_engine_; }; } // namespace webkit_glue |