diff options
-rw-r--r-- | base/gfx/native_widget_types.h | 4 | ||||
-rw-r--r-- | webkit/SConscript | 2 | ||||
-rw-r--r-- | webkit/glue/SConscript | 30 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 2 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.cc | 21 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.h | 3 |
6 files changed, 44 insertions, 18 deletions
diff --git a/base/gfx/native_widget_types.h b/base/gfx/native_widget_types.h index fe03f9e..f9623db 100644 --- a/base/gfx/native_widget_types.h +++ b/base/gfx/native_widget_types.h @@ -31,6 +31,10 @@ typedef HWND EditViewHandle; typedef NSView *ViewHandle; typedef NSWindow *WindowHandle; typedef NSTextField *EditViewHandle; +#else // null port. +typedef void* ViewHandle; +typedef void* WindowHandle; +typedef void* EditViewHandle; #endif } // namespace gfx diff --git a/webkit/SConscript b/webkit/SConscript index 8abf61c..40da418 100644 --- a/webkit/SConscript +++ b/webkit/SConscript @@ -152,6 +152,7 @@ sconscript_dirs = [ 'build/port/SConscript', 'build/V8Bindings/SConscript', 'default_plugin/SConscript', + 'glue/SConscript', ] if env['PLATFORM'] == 'win32': # These extra dirs aren't win32-specific, they're just the dirs that @@ -163,7 +164,6 @@ if env['PLATFORM'] == 'win32': 'build/WebCore/SConscript', # This almost works on linux. It requires # some changes to WebKit that we'll get # in the merge. - 'glue/SConscript', 'glue/plugins/test/SConscript', 'tools/npapi_layout_test_plugin/SConscript', 'tools/test_shell/SConscript', diff --git a/webkit/glue/SConscript b/webkit/glue/SConscript index 3084828..aca54f3 100644 --- a/webkit/glue/SConscript +++ b/webkit/glue/SConscript @@ -6,17 +6,26 @@ Import('env') env = env.Clone() -env.Append( - CCFLAGS = [ - '/TP', +if env['PLATFORM'] == 'win32': + env.Append( + CCFLAGS = [ + '/TP', - '/WX', + '/WX', - '/wd4800', - ], -) + '/wd4800', + ], + ) input_files = [ + 'webkit_glue.cc', + 'weburlrequest_impl.cc', +] + +if env['PLATFORM'] == 'win32': + # TODO(port): These extra files aren't win32-specific, they've just not been + # tested on other platforms yet. + input_files.append([ '$PENDING_DIR/AccessibleBase.cpp', '$PENDING_DIR/AccessibleDocument.cpp', 'alt_404_page_resource_fetcher.cc', @@ -69,15 +78,10 @@ input_files = [ 'webframeloaderclient_impl.cc', 'webhistoryitem_impl.cc', 'webinputevent_win.cc', - 'webkit_glue.cc', 'webplugin_impl.cc', 'webtextinput_impl.cc', - 'weburlrequest_impl.cc', 'webview_impl.cc', 'webwidget_impl.cc', -] + ]) env.ChromeStaticLibrary('Glue', input_files) - - - diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 6c2f4ce..c3d51c5 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -236,7 +236,7 @@ class WebFrameImpl : public WebFrame { return inspected_node_; } - void WebFrameImpl::selectNodeFromInspector(WebCore::Node* node); + void selectNodeFromInspector(WebCore::Node* node); // Returns which frame has an active tickmark. This function should only be // called on the main frame, as it is the only frame keeping track. Returned diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index 800eb52..8cf049a 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -2,8 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" + +#if defined(OS_WIN) #include <objidl.h> #include <mlang.h> +#endif #include "config.h" #include "webkit_version.h" @@ -14,7 +18,9 @@ #include "FrameView.h" #include "Frame.h" #include "HistoryItem.h" +#if defined(OS_WIN) // TODO(port): unnecessary after the webkit merge lands. #include "ImageSource.h" +#endif #include "KURL.h" #include "LogWin.h" #include "Page.h" @@ -68,6 +74,7 @@ bool IsLayoutTestMode() { return layout_test_mode_; } +#if defined(OS_WIN) MONITORINFOEX GetMonitorInfoForWindowHelper(HWND window) { HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY); MONITORINFOEX monitorInfo; @@ -111,6 +118,7 @@ IMLangFontLink2* GetLangFontLinkHelper() { return lang_font_link; } +#endif // defined(OS_WIN) std::wstring DumpDocumentText(WebFrame* web_frame) { WebFrameImpl* webFrameImpl = static_cast<WebFrameImpl*>(web_frame); @@ -285,6 +293,7 @@ void CheckForLeaks() { } bool DecodeImage(const std::string& image_data, SkBitmap* image) { +#if defined(OS_WIN) // TODO(port): unnecessary after the webkit merge lands. RefPtr<WebCore::SharedBuffer> buffer( new WebCore::SharedBuffer(image_data.data(), static_cast<int>(image_data.length()))); @@ -297,6 +306,11 @@ bool DecodeImage(const std::string& image_data, SkBitmap* image) { } // We failed to decode the image. return false; +#else + // This ought to work; we just need the webkit merge. + NOTIMPLEMENTED(); + return false; +#endif } // Convert from WebKit types to Glue types and notify the embedder. This should @@ -325,6 +339,7 @@ std::string GetWebKitVersion() { } const std::string& GetDefaultUserAgent() { +#if defined(OS_WIN) static std::string user_agent; static bool generated_user_agent; if (!generated_user_agent) { @@ -363,6 +378,11 @@ const std::string& GetDefaultUserAgent() { } return user_agent; +#else + // TODO(port): we need something like FileVersionInfo for our UA string. + NOTIMPLEMENTED(); + return EmptyString(); +#endif } @@ -382,4 +402,3 @@ void NotifyJSOutOfMemory(WebCore::Frame* frame) { } } // namespace webkit_glue - diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 329fc59..411ad20 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -53,7 +53,7 @@ void SetRecordPlaybackMode(bool value); void SetLayoutTestMode(bool enable); bool IsLayoutTestMode(); -#ifdef _WIN32 +#if defined(OS_WIN) // Returns the com object pointer for the FontLink interface. This is the // default way to do this operation. It can be called directly from // GetLangFontLink. @@ -279,4 +279,3 @@ void NotifyJSOutOfMemory(WebCore::Frame* frame); } // namespace webkit_glue #endif // WEBKIT_GLUE_H__ - |