diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 22:01:57 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-15 22:01:57 +0000 |
commit | 8939e9ecf23f09460c91543c783bed0bac780014 (patch) | |
tree | bd6930f74b05846299da0283c9da3f4c39fa1b24 /webkit/port/platform | |
parent | 10e42bf623bcc526e25d5b22760cce3d0766039b (diff) | |
download | chromium_src-8939e9ecf23f09460c91543c783bed0bac780014.zip chromium_src-8939e9ecf23f09460c91543c783bed0bac780014.tar.gz chromium_src-8939e9ecf23f09460c91543c783bed0bac780014.tar.bz2 |
Move many files that were suffixed Win.cpp to Chromium.cpp, and place them in chromium/ subdirectories. We still build these files with PLATFORM(WIN) defined.
In this change, I also killed off LogWin.{h,cpp} since we don't use it. So, you will see some changes related to that.
R=dglazkov,tony
Review URL: http://codereview.chromium.org/7419
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/platform')
-rw-r--r-- | webkit/port/platform/LogWin.cpp | 56 | ||||
-rw-r--r-- | webkit/port/platform/LogWin.h | 48 | ||||
-rw-r--r-- | webkit/port/platform/chromium/ContextMenuChromium.cpp (renamed from webkit/port/platform/ContextMenuWin.cpp) | 17 | ||||
-rw-r--r-- | webkit/port/platform/chromium/ContextMenuItemChromium.cpp (renamed from webkit/port/platform/ContextMenuItemWin.cpp) | 6 | ||||
-rw-r--r-- | webkit/port/platform/chromium/CursorChromium.cpp (renamed from webkit/port/platform/CursorWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/DragDataChromium.cpp (renamed from webkit/port/platform/DragDataWin.cpp) | 10 | ||||
-rw-r--r-- | webkit/port/platform/chromium/DragImageChromium.cpp (renamed from webkit/port/platform/DragImageWin.cpp) | 9 | ||||
-rw-r--r-- | webkit/port/platform/chromium/FileChooserChromium.cpp (renamed from webkit/port/platform/FileChooserWin.cpp) | 13 | ||||
-rw-r--r-- | webkit/port/platform/chromium/FramelessScrollView.cpp (renamed from webkit/port/platform/FramelessScrollView.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/FramelessScrollView.h (renamed from webkit/port/platform/FramelessScrollView.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/Language.cpp | 48 | ||||
-rw-r--r-- | webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp (renamed from webkit/port/platform/MimeTypeRegistryWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/PlatformScrollBar.h (renamed from webkit/port/platform/PlatformScrollBar.h) | 4 | ||||
-rw-r--r-- | webkit/port/platform/chromium/PlatformScrollBarChromium.cpp (renamed from webkit/port/platform/PlatformScrollBarWin.cpp) | 6 | ||||
-rw-r--r-- | webkit/port/platform/chromium/PopupMenuChromium.cpp (renamed from webkit/port/platform/PopupMenuWin.cpp) | 24 | ||||
-rw-r--r-- | webkit/port/platform/chromium/SSLKeyGeneratorChromium.cpp (renamed from webkit/port/platform/SSLKeyGeneratorWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/ScrollViewChromium.cpp (renamed from webkit/port/platform/ScrollViewWin.cpp) | 29 | ||||
-rw-r--r-- | webkit/port/platform/chromium/SearchPopupMenuChromium.cpp (renamed from webkit/port/platform/SearchPopupMenuWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/SharedTimerChromium.cpp (renamed from webkit/port/platform/SharedTimerWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/SystemTimeChromium.cpp (renamed from webkit/port/platform/SystemTimeWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/TemporaryLinkStubs.cpp (renamed from webkit/port/platform/TemporaryLinkStubs.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/TextBoundariesChromium.cpp (renamed from webkit/port/platform/TextBoundariesWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/TextBreakIteratorInternalICUChromium.cpp (renamed from webkit/port/platform/TextBreakIteratorInternalICUWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/chromium/WidgetChromium.cpp (renamed from webkit/port/platform/WidgetWin.cpp) | 6 | ||||
-rw-r--r-- | webkit/port/platform/chromium/WidgetClientChromium.h (renamed from webkit/port/platform/WidgetClientWin.h) | 10 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/AuthenticationChallenge.h (renamed from webkit/port/platform/network/AuthenticationChallenge.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/AuthenticationChallengeChromium.cpp (renamed from webkit/port/platform/network/AuthenticationChallenge.cpp) | 26 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/CookieJarChromium.cpp (renamed from webkit/port/platform/network/CookieJarWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/DNSChromium.cpp (renamed from webkit/port/platform/network/DNS.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/NetworkStateNotifierChromium.cpp (renamed from webkit/port/platform/network/NetworkStateNotifierWin.cpp) | 3 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/ResourceError.h (renamed from webkit/port/platform/network/ResourceError.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/ResourceRequest.h (renamed from webkit/port/platform/network/ResourceRequest.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/network/chromium/ResourceResponse.h (renamed from webkit/port/platform/network/ResourceResponse.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/BString.cpp (renamed from webkit/port/platform/BString.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/BString.h (renamed from webkit/port/platform/BString.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/COMPtr.h (renamed from webkit/port/platform/COMPtr.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/ClipboardUtilitiesWin.cpp (renamed from webkit/port/platform/ClipboardUtilitiesWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/ClipboardUtilitiesWin.h (renamed from webkit/port/platform/ClipboardUtilitiesWin.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/ClipboardWin.cpp (renamed from webkit/port/platform/ClipboardWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/ClipboardWin.h (renamed from webkit/port/platform/ClipboardWin.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/EditorWin.cpp (renamed from webkit/port/platform/EditorWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/KeyEventWin.cpp (renamed from webkit/port/platform/KeyEventWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/PasteboardWin.cpp (renamed from webkit/port/platform/PasteboardWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/PlatformMouseEventWin.cpp (renamed from webkit/port/platform/PlatformMouseEventWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/README | 2 | ||||
-rw-r--r-- | webkit/port/platform/win/ScreenWin.cpp (renamed from webkit/port/platform/ScreenWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/SoundWin.cpp (renamed from webkit/port/platform/SoundWin.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/WCDataObject.cpp (renamed from webkit/port/platform/WCDataObject.cpp) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/WCDataObject.h (renamed from webkit/port/platform/WCDataObject.h) | 0 | ||||
-rw-r--r-- | webkit/port/platform/win/WheelEventWin.cpp (renamed from webkit/port/platform/WheelEventWin.cpp) | 0 |
50 files changed, 132 insertions, 185 deletions
diff --git a/webkit/port/platform/LogWin.cpp b/webkit/port/platform/LogWin.cpp deleted file mode 100644 index 583dbff..0000000 --- a/webkit/port/platform/LogWin.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "config.h" -#include <windows.h> -#include <stdarg.h> -#include <stdio.h> - -#define LOG_ENABLE -#include "LogWin.h" - -#include "glue/webkit_glue.h" - -namespace WebCore { - -#ifndef NDEBUG -void __cdecl LogPrintf::operator()(const char* fmt, ...) { - va_list args; - va_start(args, fmt); - - char buf[512]; - _vsnprintf(buf, sizeof(buf), fmt, args); - - webkit_glue::AppendToLog(m_file, m_line, buf); - - va_end(args); -} -#endif - -} // namespace WebCore diff --git a/webkit/port/platform/LogWin.h b/webkit/port/platform/LogWin.h deleted file mode 100644 index dfbfb77..0000000 --- a/webkit/port/platform/LogWin.h +++ /dev/null @@ -1,48 +0,0 @@ -// vim:set ts=4 sw=4 sts=4 cin et: -// -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file defines a simple printf-style logging function that writes to the -// debug console in visual studio. To enable logging, define LOG_ENABLE before -// including this header file. -// -// Usage: -// -// { -// LOG(("foo bar: %d", blah())); -// ... -// } -// -// Parameters are only evaluated in debug builds. -// -#ifndef LogWin_h -#define LogWin_h -#undef LOG - -#if defined(LOG_ENABLE) && !defined(NDEBUG) -namespace WebCore { - class LogPrintf { - public: - LogPrintf(const char* f, int l) : m_file(f), m_line(l) {} - void __cdecl operator()(const char* format, ...); - private: - const char* m_file; - int m_line; - }; -} -#define LOG(args) WebCore::LogPrintf(__FILE__, __LINE__) args -#else -#define LOG(args) -#endif - -// Log a console message if a function is not implemented. -#ifndef notImplemented -#define notImplemented() do { \ - LOG(("FIXME: UNIMPLEMENTED %s()\n", __FUNCTION__)); \ -} while (0) -#endif - -#endif - diff --git a/webkit/port/platform/ContextMenuWin.cpp b/webkit/port/platform/chromium/ContextMenuChromium.cpp index 2861a5f..81c318d 100644 --- a/webkit/port/platform/ContextMenuWin.cpp +++ b/webkit/port/platform/chromium/ContextMenuChromium.cpp @@ -26,12 +26,6 @@ #include "config.h" #include "ContextMenu.h" -#include "CString.h" -#include "Document.h" -#include "Frame.h" -#include "FrameView.h" -#include "Node.h" - namespace WebCore { // This is a stub implementation of WebKit's ContextMenu class that does @@ -66,11 +60,6 @@ void ContextMenu::appendItem(ContextMenuItem& item) { } -static ContextMenuItem* contextMenuItemByIdOrPosition(HMENU menu, unsigned id, BOOL byPosition) -{ - return 0; -} - ContextMenuItem* ContextMenu::itemWithAction(unsigned action) { return 0; @@ -81,16 +70,16 @@ ContextMenuItem* ContextMenu::itemAtIndex(unsigned index, const PlatformMenuDesc return 0; } -void ContextMenu::setPlatformDescription(HMENU menu) +void ContextMenu::setPlatformDescription(PlatformMenuDescription menu) { } -HMENU ContextMenu::platformDescription() const +PlatformMenuDescription ContextMenu::platformDescription() const { return m_platformDescription; } -HMENU ContextMenu::releasePlatformDescription() +PlatformMenuDescription ContextMenu::releasePlatformDescription() { return 0; } diff --git a/webkit/port/platform/ContextMenuItemWin.cpp b/webkit/port/platform/chromium/ContextMenuItemChromium.cpp index ccf6cd9..1aab658 100644 --- a/webkit/port/platform/ContextMenuItemWin.cpp +++ b/webkit/port/platform/chromium/ContextMenuItemChromium.cpp @@ -28,14 +28,12 @@ #include "ContextMenu.h" -#include "CString.h" - namespace WebCore { // This is a stub implementation of WebKit's ContextMenu class that does // nothing. -ContextMenuItem::ContextMenuItem(LPMENUITEMINFO item) +ContextMenuItem::ContextMenuItem(PlatformMenuItemDescription item) { } @@ -51,7 +49,7 @@ ContextMenuItem::~ContextMenuItem() { } -LPMENUITEMINFO ContextMenuItem::releasePlatformDescription() +PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription() { return 0; } diff --git a/webkit/port/platform/CursorWin.cpp b/webkit/port/platform/chromium/CursorChromium.cpp index 884c464d..884c464d 100644 --- a/webkit/port/platform/CursorWin.cpp +++ b/webkit/port/platform/chromium/CursorChromium.cpp diff --git a/webkit/port/platform/DragDataWin.cpp b/webkit/port/platform/chromium/DragDataChromium.cpp index 8deca48..cc53e09 100644 --- a/webkit/port/platform/DragDataWin.cpp +++ b/webkit/port/platform/chromium/DragDataChromium.cpp @@ -29,13 +29,16 @@ #include "config.h" #include "DragData.h" +#if PLATFORM(WIN) #include "ClipboardWin.h" #include "ClipboardUtilitiesWin.h" +#include "WCDataObject.h" +#endif + #include "DocumentFragment.h" #include "KURL.h" #include "PlatformString.h" #include "Markup.h" -#include "WCDataObject.h" #undef LOG #include "base/file_util.h" @@ -65,6 +68,8 @@ namespace WebCore { PassRefPtr<Clipboard> DragData::createClipboard(ClipboardAccessPolicy policy) const { +// TODO(darin): Invent ClipboardChromium and use that instead. +#if PLATFORM(WIN) WCDataObject* data; WCDataObject::createInstance(&data); RefPtr<ClipboardWin> clipboard = ClipboardWin::create(true, data, policy); @@ -73,6 +78,9 @@ PassRefPtr<Clipboard> DragData::createClipboard(ClipboardAccessPolicy policy) co data->Release(); return clipboard.release(); +#else + return PassRefPtr<Clipboard>(0); +#endif } bool DragData::containsURL() const diff --git a/webkit/port/platform/DragImageWin.cpp b/webkit/port/platform/chromium/DragImageChromium.cpp index 24fe371..e3bc70e 100644 --- a/webkit/port/platform/DragImageWin.cpp +++ b/webkit/port/platform/chromium/DragImageChromium.cpp @@ -30,17 +30,26 @@ #include "GraphicsContext.h" #include "Image.h" +#if PLATFORM(WIN) #include <windows.h> +#endif namespace WebCore { IntSize dragImageSize(DragImageRef image) { +// TODO(darin): DragImageRef should be changed to be a cross-platform +// container. However, it may still make sense for its contents to be +// platform-dependent. +#if PLATFORM(WIN) if (!image) return IntSize(); BITMAP b; GetObject(image, sizeof(BITMAP), &b); return IntSize(b.bmWidth, b.bmHeight); +#else + return IntSize(); +#endif } void deleteDragImage(DragImageRef image) diff --git a/webkit/port/platform/FileChooserWin.cpp b/webkit/port/platform/chromium/FileChooserChromium.cpp index 8497372..aed99d7 100644 --- a/webkit/port/platform/FileChooserWin.cpp +++ b/webkit/port/platform/chromium/FileChooserChromium.cpp @@ -27,12 +27,12 @@ #include <shlwapi.h> #pragma warning(push, 0) -#include "ChromeClientWin.h" +#include "ChromeClientChromium.h" #include "Document.h" #include "Frame.h" #include "FileChooser.h" -#include "Icon.h" #include "LocalizedStrings.h" +#include "NotImplemented.h" #include "Page.h" #include "StringTruncator.h" #pragma warning(pop) @@ -45,8 +45,8 @@ void FileChooser::openFileChooser(Document* document) if (!frame) return; - ChromeClientWin* client = - static_cast<ChromeClientWin*>(frame->page()->chrome()->client()); + ChromeClientChromium* client = + static_cast<ChromeClientChromium*>(frame->page()->chrome()->client()); String result; client->runFileChooser(m_filename, &*this); @@ -61,10 +61,15 @@ String FileChooser::basenameForWidth(const Font& font, int width) const if (m_filename.isEmpty()) string = fileButtonNoFileSelectedLabel(); else { +#if PLATFORM(WIN_OS) String tmpFilename = m_filename; // Apple's code has a LPTSTR here, which will compile and run, but is wrong. wchar_t* basename = PathFindFileName(tmpFilename.charactersWithNullTermination()); string = String(basename); +#else + notImplemented(); + string = "fixme"; +#endif } return StringTruncator::centerTruncate(string, static_cast<float>(width), font, false); diff --git a/webkit/port/platform/FramelessScrollView.cpp b/webkit/port/platform/chromium/FramelessScrollView.cpp index 8a40150..8a40150 100644 --- a/webkit/port/platform/FramelessScrollView.cpp +++ b/webkit/port/platform/chromium/FramelessScrollView.cpp diff --git a/webkit/port/platform/FramelessScrollView.h b/webkit/port/platform/chromium/FramelessScrollView.h index a71fcfb..a71fcfb 100644 --- a/webkit/port/platform/FramelessScrollView.h +++ b/webkit/port/platform/chromium/FramelessScrollView.h diff --git a/webkit/port/platform/chromium/Language.cpp b/webkit/port/platform/chromium/Language.cpp new file mode 100644 index 0000000..b21f7d4 --- /dev/null +++ b/webkit/port/platform/chromium/Language.cpp @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "Language.h" + +#include "CString.h" +#include "PlatformString.h" +#include "webkit/glue/glue_util.h" +#include "webkit/glue/webkit_glue.h" + + +namespace WebCore { + +String defaultLanguage() +{ + static String computedDefaultLanguage; + if (!computedDefaultLanguage.isEmpty()) + return computedDefaultLanguage; + + computedDefaultLanguage = + webkit_glue::StdWStringToString(webkit_glue::GetWebKitLocale()); + return computedDefaultLanguage; +} + +} diff --git a/webkit/port/platform/MimeTypeRegistryWin.cpp b/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp index a4eaa9f..a4eaa9f 100644 --- a/webkit/port/platform/MimeTypeRegistryWin.cpp +++ b/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp diff --git a/webkit/port/platform/PlatformScrollBar.h b/webkit/port/platform/chromium/PlatformScrollBar.h index 4b3c17b..45ec726 100644 --- a/webkit/port/platform/PlatformScrollBar.h +++ b/webkit/port/platform/chromium/PlatformScrollBar.h @@ -32,10 +32,6 @@ #include "ScrollBar.h" #include "Timer.h" -namespace gfx { -class PlatformCanvasWin; -} - namespace WebCore { // IMPORTANT NOTES ABOUT SCROLLBARS diff --git a/webkit/port/platform/PlatformScrollBarWin.cpp b/webkit/port/platform/chromium/PlatformScrollBarChromium.cpp index 723d321..ff75630 100644 --- a/webkit/port/platform/PlatformScrollBarWin.cpp +++ b/webkit/port/platform/chromium/PlatformScrollBarChromium.cpp @@ -39,7 +39,7 @@ #include "PlatformScrollBar.h" #include "Range.h" #include "ScrollView.h" -#include "WidgetClientWin.h" +#include "WidgetClientChromium.h" #include "graphics/SkiaUtils.h" @@ -141,8 +141,8 @@ void PlatformScrollbar::DrawTickmarks(GraphicsContext* context) const if (horz) return; - // We need to as the WidgetClientWin for the bitmap to use to draw. - WidgetClientWin* widget_client = static_cast<WidgetClientWin*>( + // We need to as the WidgetClientChromium for the bitmap to use to draw. + WidgetClientChromium* widget_client = static_cast<WidgetClientChromium*>( WebCore::Widget::client()); if (!widget_client) return; // Cannot draw without access to the bitmap. diff --git a/webkit/port/platform/PopupMenuWin.cpp b/webkit/port/platform/chromium/PopupMenuChromium.cpp index ae0e407c..1071d8c 100644 --- a/webkit/port/platform/PopupMenuWin.cpp +++ b/webkit/port/platform/chromium/PopupMenuChromium.cpp @@ -33,7 +33,7 @@ #include "PopupMenu.h" #include "CharacterNames.h" -#include "ChromeClientWin.h" +#include "ChromeClientChromium.h" #include "Document.h" #include "Font.h" #include "Frame.h" @@ -51,12 +51,9 @@ #include "RenderBlock.h" #include "RenderTheme.h" #include "Widget.h" -#include "WidgetClientWin.h" +#include "WidgetClientChromium.h" #pragma warning(pop) -//#define LOG_ENABLE -#include "LogWin.h" - using namespace WTF; using namespace Unicode; @@ -358,10 +355,10 @@ void PopupContainer::showPopup(FrameView* view) // WidgetClient about it. It should assign us a client. layout(); - WidgetClientWin* widgetClient = - static_cast<WidgetClientWin*>(view->client()); - ChromeClientWin* chromeClient = - static_cast<ChromeClientWin*>(view->frame()->page()->chrome()->client()); + WidgetClientChromium* widgetClient = static_cast<WidgetClientChromium*>( + view->client()); + ChromeClientChromium* chromeClient = static_cast<ChromeClientChromium*>( + view->frame()->page()->chrome()->client()); if (widgetClient && chromeClient) { // If the popup would extend past the bottom of the screen, open upwards // instead. @@ -393,7 +390,7 @@ void PopupContainer::hidePopup() removeChild(m_listBox.get()); if (client()) - static_cast<WidgetClientWin*>(client())->popupClosed(this); + static_cast<WidgetClientChromium*>(client())->popupClosed(this); } void PopupContainer::layout() @@ -669,9 +666,6 @@ void PopupListBox::paint(GraphicsContext* gc, const IntRect& rect) r.move(-tx, -ty); - LOG(("PopupListBox::paint [%d,%d] [r: %d,%d,%d,%d]", tx, ty, - r.x(), r.y(), r.width(), r.height())); - // set clip rect to match revised damage rect gc->save(); gc->translate(static_cast<float>(tx), static_cast<float>(ty)); @@ -726,10 +720,6 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd gc->fillRect(rowRect, backColor); gc->setFillColor(textColor); - LOG(("paintRow %d, [%d, %d, %d, %d] %x on %x", rowIndex, - rowRect.x(), rowRect.y(), rowRect.width(), rowRect.height(), - textColor.rgb(), backColor.rgb())); - Font itemFont = getRowFont(rowIndex); gc->setFont(itemFont); diff --git a/webkit/port/platform/SSLKeyGeneratorWin.cpp b/webkit/port/platform/chromium/SSLKeyGeneratorChromium.cpp index 0b6cb7c..0b6cb7c 100644 --- a/webkit/port/platform/SSLKeyGeneratorWin.cpp +++ b/webkit/port/platform/chromium/SSLKeyGeneratorChromium.cpp diff --git a/webkit/port/platform/ScrollViewWin.cpp b/webkit/port/platform/chromium/ScrollViewChromium.cpp index 2a7ebbc..8ab2822 100644 --- a/webkit/port/platform/ScrollViewWin.cpp +++ b/webkit/port/platform/chromium/ScrollViewChromium.cpp @@ -43,7 +43,7 @@ #include "RenderTheme.h" #include "ScrollBar.h" #include "SkiaUtils.h" -#include "WidgetClientWin.h" +#include "WidgetClientChromium.h" #include <algorithm> #include <wtf/Assertions.h> #include <wtf/HashSet.h> @@ -184,8 +184,8 @@ void ScrollView::ScrollViewPrivate::valueChanged(Scrollbar* bar) frame->sendScrollEvent(); // Inform the delegate that the scroll position has changed. - WidgetClientWin* client = - static_cast<WidgetClientWin*>(m_view->client()); + WidgetClientChromium* client = + static_cast<WidgetClientChromium*>(m_view->client()); if (client) client->onScrollPositionChanged(m_view); } @@ -273,7 +273,8 @@ const Vector<RefPtr<Range> >* ScrollView::ScrollViewPrivate::getTickmarks() cons if (!frame) return NULL; // NOTE: Frame can be null for dropdown boxes. - WidgetClientWin* c = static_cast<WidgetClientWin*>(m_view->client()); + WidgetClientChromium* c = + static_cast<WidgetClientChromium*>(m_view->client()); ASSERT(c); return c->getTickmarks(view->frame()); } @@ -286,9 +287,10 @@ size_t ScrollView::ScrollViewPrivate::getActiveTickmarkIndex() const // NOTE: Frame can be null for dropdown boxes. if (!frame) - return WidgetClientWin::kNoTickmark; + return WidgetClientChromium::kNoTickmark; - WidgetClientWin* c = static_cast<WidgetClientWin*>(m_view->client()); + WidgetClientChromium* c = + static_cast<WidgetClientChromium*>(m_view->client()); ASSERT(c); return c->getActiveTickmarkIndex(view->frame()); } @@ -296,9 +298,10 @@ size_t ScrollView::ScrollViewPrivate::getActiveTickmarkIndex() const const SkBitmap* ScrollView::ScrollViewPrivate::GetPreloadedBitmapFromRenderer( int resource_id) const { - WidgetClientWin* c = static_cast<WidgetClientWin*>(m_view->client()); + WidgetClientChromium* c = + static_cast<WidgetClientChromium*>(m_view->client()); if (!c) - return NULL; + return NULL; return c->getPreloadedResourceBitmap(resource_id); } @@ -904,7 +907,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset) m_data->scrollBackingStore(scrollDelta); // Inform the delegate that the scroll position has changed. - WidgetClientWin* c = static_cast<WidgetClientWin*>(client()); + WidgetClientChromium* c = static_cast<WidgetClientChromium*>(client()); if (c) c->onScrollPositionChanged(this); } @@ -1095,7 +1098,7 @@ void ScrollView::setParent(ScrollView* parentView) void ScrollView::addToDirtyRegion(const IntRect& containingWindowRect) { - WidgetClientWin* c = static_cast<WidgetClientWin*>(client()); + WidgetClientChromium* c = static_cast<WidgetClientChromium*>(client()); if (c) c->invalidateRect(containingWindowRect); } @@ -1110,7 +1113,7 @@ void ScrollView::scrollBackingStore(int dx, int dy, const IntRect& scrollViewRec return; } - WidgetClientWin* c = static_cast<WidgetClientWin*>(client()); + WidgetClientChromium* c = static_cast<WidgetClientChromium*>(client()); if (c) { // TODO(ericroman): would be better to pass both the scroll rect // and clip rect up to the client and let them decide how best to @@ -1128,9 +1131,9 @@ void ScrollView::updateBackingStore() bool ScrollView::inWindow() const { - WidgetClientWin* c = static_cast<WidgetClientWin*>(client()); + WidgetClientChromium* c = static_cast<WidgetClientChromium*>(client()); if (!c) - return false; + return false; return !c->isHidden(); } diff --git a/webkit/port/platform/SearchPopupMenuWin.cpp b/webkit/port/platform/chromium/SearchPopupMenuChromium.cpp index d16ffa6..d16ffa6 100644 --- a/webkit/port/platform/SearchPopupMenuWin.cpp +++ b/webkit/port/platform/chromium/SearchPopupMenuChromium.cpp diff --git a/webkit/port/platform/SharedTimerWin.cpp b/webkit/port/platform/chromium/SharedTimerChromium.cpp index b7f3b08..b7f3b08 100644 --- a/webkit/port/platform/SharedTimerWin.cpp +++ b/webkit/port/platform/chromium/SharedTimerChromium.cpp diff --git a/webkit/port/platform/SystemTimeWin.cpp b/webkit/port/platform/chromium/SystemTimeChromium.cpp index fe3f6d6..fe3f6d6 100644 --- a/webkit/port/platform/SystemTimeWin.cpp +++ b/webkit/port/platform/chromium/SystemTimeChromium.cpp diff --git a/webkit/port/platform/TemporaryLinkStubs.cpp b/webkit/port/platform/chromium/TemporaryLinkStubs.cpp index 34fb5f3..34fb5f3 100644 --- a/webkit/port/platform/TemporaryLinkStubs.cpp +++ b/webkit/port/platform/chromium/TemporaryLinkStubs.cpp diff --git a/webkit/port/platform/TextBoundariesWin.cpp b/webkit/port/platform/chromium/TextBoundariesChromium.cpp index e633f9b..e633f9b 100644 --- a/webkit/port/platform/TextBoundariesWin.cpp +++ b/webkit/port/platform/chromium/TextBoundariesChromium.cpp diff --git a/webkit/port/platform/TextBreakIteratorInternalICUWin.cpp b/webkit/port/platform/chromium/TextBreakIteratorInternalICUChromium.cpp index 000ae9b..000ae9b 100644 --- a/webkit/port/platform/TextBreakIteratorInternalICUWin.cpp +++ b/webkit/port/platform/chromium/TextBreakIteratorInternalICUChromium.cpp diff --git a/webkit/port/platform/WidgetWin.cpp b/webkit/port/platform/chromium/WidgetChromium.cpp index 2ff7ea65..abd6b02 100644 --- a/webkit/port/platform/WidgetWin.cpp +++ b/webkit/port/platform/chromium/WidgetChromium.cpp @@ -33,14 +33,14 @@ #include "FrameView.h" #include "GraphicsContext.h" #include "IntRect.h" -#include "WidgetClientWin.h" +#include "WidgetClientChromium.h" namespace WebCore { class WidgetPrivate { public: - WidgetClientWin* client; + WidgetClientChromium* client; ScrollView* parent; IntRect frameRect; bool enabled; @@ -77,7 +77,7 @@ HWND Widget::containingWindow() const void Widget::setClient(WidgetClient* c) { - data->client = static_cast<WidgetClientWin*>(c); + data->client = static_cast<WidgetClientChromium*>(c); } WidgetClient* Widget::client() const diff --git a/webkit/port/platform/WidgetClientWin.h b/webkit/port/platform/chromium/WidgetClientChromium.h index 48d1db5..f39c49b 100644 --- a/webkit/port/platform/WidgetClientWin.h +++ b/webkit/port/platform/chromium/WidgetClientChromium.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 WidgetClientWin_H__ -#define WidgetClientWin_H__ +#ifndef WidgetClientChromium_H__ +#define WidgetClientChromium_H__ #include "base/gfx/native_widget_types.h" #include "WidgetClient.h" @@ -17,9 +17,9 @@ class IntRect; class Range; // Generic interface for features needed by the Widget. -class WidgetClientWin : public WidgetClient { +class WidgetClientChromium : public WidgetClient { public: - virtual ~WidgetClientWin() {} + virtual ~WidgetClientChromium() {} // Returns the containing window for the Widget. // TODO(pinkerton): this needs a better name, "window" is incorrect on other @@ -72,4 +72,4 @@ public: } // namespace WebCore -#endif // WidgetClientWin_H__ +#endif // WidgetClientChromium_H__ diff --git a/webkit/port/platform/network/AuthenticationChallenge.h b/webkit/port/platform/network/chromium/AuthenticationChallenge.h index b1db6cf..b1db6cf 100644 --- a/webkit/port/platform/network/AuthenticationChallenge.h +++ b/webkit/port/platform/network/chromium/AuthenticationChallenge.h diff --git a/webkit/port/platform/network/AuthenticationChallenge.cpp b/webkit/port/platform/network/chromium/AuthenticationChallengeChromium.cpp index f6831cf..fb3c5a4 100644 --- a/webkit/port/platform/network/AuthenticationChallenge.cpp +++ b/webkit/port/platform/network/chromium/AuthenticationChallengeChromium.cpp @@ -21,16 +21,16 @@ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */
-
-#include "config.h"
-#include "AuthenticationChallenge.h"
-
-namespace WebCore {
-
-bool AuthenticationChallenge::platformCompare(const AuthenticationChallenge& a, const AuthenticationChallenge& b)
-{
- return true;
-}
-
-} // namespace WebCore
+ */ + +#include "config.h" +#include "AuthenticationChallenge.h" + +namespace WebCore { + +bool AuthenticationChallenge::platformCompare(const AuthenticationChallenge& a, const AuthenticationChallenge& b) +{ + return true; +} + +} // namespace WebCore diff --git a/webkit/port/platform/network/CookieJarWin.cpp b/webkit/port/platform/network/chromium/CookieJarChromium.cpp index 9d2ec62..9d2ec62 100644 --- a/webkit/port/platform/network/CookieJarWin.cpp +++ b/webkit/port/platform/network/chromium/CookieJarChromium.cpp diff --git a/webkit/port/platform/network/DNS.cpp b/webkit/port/platform/network/chromium/DNSChromium.cpp index 2044742..2044742 100644 --- a/webkit/port/platform/network/DNS.cpp +++ b/webkit/port/platform/network/chromium/DNSChromium.cpp diff --git a/webkit/port/platform/network/NetworkStateNotifierWin.cpp b/webkit/port/platform/network/chromium/NetworkStateNotifierChromium.cpp index 72104bb..8d0d877 100644 --- a/webkit/port/platform/network/NetworkStateNotifierWin.cpp +++ b/webkit/port/platform/network/chromium/NetworkStateNotifierChromium.cpp @@ -36,6 +36,8 @@ void NetworkStateNotifier::updateState() {
}
+// TODO(darin): Kill this once we stop defining PLATFORM(WIN)
+#if PLATFORM(WIN)
void NetworkStateNotifier::addressChanged()
{
}
@@ -51,6 +53,7 @@ void CALLBACK NetworkStateNotifier::addrChangeCallback(void* context, BOOLEAN ti void NetworkStateNotifier::registerForAddressChange()
{
}
+#endif
NetworkStateNotifier::NetworkStateNotifier()
: m_isOnLine(true)
diff --git a/webkit/port/platform/network/ResourceError.h b/webkit/port/platform/network/chromium/ResourceError.h index a71b302..a71b302 100644 --- a/webkit/port/platform/network/ResourceError.h +++ b/webkit/port/platform/network/chromium/ResourceError.h diff --git a/webkit/port/platform/network/ResourceRequest.h b/webkit/port/platform/network/chromium/ResourceRequest.h index b6119db..b6119db 100644 --- a/webkit/port/platform/network/ResourceRequest.h +++ b/webkit/port/platform/network/chromium/ResourceRequest.h diff --git a/webkit/port/platform/network/ResourceResponse.h b/webkit/port/platform/network/chromium/ResourceResponse.h index cf498bd..cf498bd 100644 --- a/webkit/port/platform/network/ResourceResponse.h +++ b/webkit/port/platform/network/chromium/ResourceResponse.h diff --git a/webkit/port/platform/BString.cpp b/webkit/port/platform/win/BString.cpp index c049b1b..c049b1b 100644 --- a/webkit/port/platform/BString.cpp +++ b/webkit/port/platform/win/BString.cpp diff --git a/webkit/port/platform/BString.h b/webkit/port/platform/win/BString.h index 803a9b0..803a9b0 100644 --- a/webkit/port/platform/BString.h +++ b/webkit/port/platform/win/BString.h diff --git a/webkit/port/platform/COMPtr.h b/webkit/port/platform/win/COMPtr.h index c06b3d2..c06b3d2 100644 --- a/webkit/port/platform/COMPtr.h +++ b/webkit/port/platform/win/COMPtr.h diff --git a/webkit/port/platform/ClipboardUtilitiesWin.cpp b/webkit/port/platform/win/ClipboardUtilitiesWin.cpp index f23c2fe..f23c2fe 100644 --- a/webkit/port/platform/ClipboardUtilitiesWin.cpp +++ b/webkit/port/platform/win/ClipboardUtilitiesWin.cpp diff --git a/webkit/port/platform/ClipboardUtilitiesWin.h b/webkit/port/platform/win/ClipboardUtilitiesWin.h index bc8fb0a..bc8fb0a 100644 --- a/webkit/port/platform/ClipboardUtilitiesWin.h +++ b/webkit/port/platform/win/ClipboardUtilitiesWin.h diff --git a/webkit/port/platform/ClipboardWin.cpp b/webkit/port/platform/win/ClipboardWin.cpp index 0383610..0383610 100644 --- a/webkit/port/platform/ClipboardWin.cpp +++ b/webkit/port/platform/win/ClipboardWin.cpp diff --git a/webkit/port/platform/ClipboardWin.h b/webkit/port/platform/win/ClipboardWin.h index a52c242..a52c242 100644 --- a/webkit/port/platform/ClipboardWin.h +++ b/webkit/port/platform/win/ClipboardWin.h diff --git a/webkit/port/platform/EditorWin.cpp b/webkit/port/platform/win/EditorWin.cpp index 8ffcf9a..8ffcf9a 100644 --- a/webkit/port/platform/EditorWin.cpp +++ b/webkit/port/platform/win/EditorWin.cpp diff --git a/webkit/port/platform/KeyEventWin.cpp b/webkit/port/platform/win/KeyEventWin.cpp index 5650747..5650747 100644 --- a/webkit/port/platform/KeyEventWin.cpp +++ b/webkit/port/platform/win/KeyEventWin.cpp diff --git a/webkit/port/platform/PasteboardWin.cpp b/webkit/port/platform/win/PasteboardWin.cpp index f22b85f..f22b85f 100644 --- a/webkit/port/platform/PasteboardWin.cpp +++ b/webkit/port/platform/win/PasteboardWin.cpp diff --git a/webkit/port/platform/PlatformMouseEventWin.cpp b/webkit/port/platform/win/PlatformMouseEventWin.cpp index 33c5692..33c5692 100644 --- a/webkit/port/platform/PlatformMouseEventWin.cpp +++ b/webkit/port/platform/win/PlatformMouseEventWin.cpp diff --git a/webkit/port/platform/win/README b/webkit/port/platform/win/README new file mode 100644 index 0000000..7fe1b47 --- /dev/null +++ b/webkit/port/platform/win/README @@ -0,0 +1,2 @@ +This directory is temporary and must go away. It contains forks of some files +from WebCore/platform/win/. diff --git a/webkit/port/platform/ScreenWin.cpp b/webkit/port/platform/win/ScreenWin.cpp index 83f97cd..83f97cd 100644 --- a/webkit/port/platform/ScreenWin.cpp +++ b/webkit/port/platform/win/ScreenWin.cpp diff --git a/webkit/port/platform/SoundWin.cpp b/webkit/port/platform/win/SoundWin.cpp index 443e7d9..443e7d9 100644 --- a/webkit/port/platform/SoundWin.cpp +++ b/webkit/port/platform/win/SoundWin.cpp diff --git a/webkit/port/platform/WCDataObject.cpp b/webkit/port/platform/win/WCDataObject.cpp index 57e062a..57e062a 100644 --- a/webkit/port/platform/WCDataObject.cpp +++ b/webkit/port/platform/win/WCDataObject.cpp diff --git a/webkit/port/platform/WCDataObject.h b/webkit/port/platform/win/WCDataObject.h index 51e37a0..51e37a0 100644 --- a/webkit/port/platform/WCDataObject.h +++ b/webkit/port/platform/win/WCDataObject.h diff --git a/webkit/port/platform/WheelEventWin.cpp b/webkit/port/platform/win/WheelEventWin.cpp index 22c2dce..22c2dce 100644 --- a/webkit/port/platform/WheelEventWin.cpp +++ b/webkit/port/platform/win/WheelEventWin.cpp |