Commit 197a3918 authored by kov@webkit.org's avatar kov@webkit.org
Browse files

2010-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

        Reviewed by Martin Robinson.

        [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
        https://bugs.webkit.org/show_bug.cgi?id=50698

        Split private bits of WebKitWebFrame to its own private header, and
        to its implementation file.

        * GNUmakefile.am:
        * WebCoreSupport/ChromeClientGtk.cpp:
        * WebCoreSupport/DragClientGtk.cpp:
        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        * webkit/webkitprivate.cpp:
        * webkit/webkitprivate.h:
        * webkit/webkitwebdatasource.cpp:
        * webkit/webkitwebframe.cpp:
        (WebKit::getViewFromFrame):
        (WebKit::core):
        (WebKit::kit):
        * webkit/webkitwebframeprivate.h: Added.
        * webkit/webkitwebpolicydecision.cpp:
        * webkit/webkitwebview.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7be215a5
2010-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Split webkitprivate.{cpp,h} in more manageable chunks
https://bugs.webkit.org/show_bug.cgi?id=50698
Split private bits of WebKitWebFrame to its own private header, and
to its implementation file.
* GNUmakefile.am:
* WebCoreSupport/ChromeClientGtk.cpp:
* WebCoreSupport/DragClientGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
* webkit/webkitprivate.cpp:
* webkit/webkitprivate.h:
* webkit/webkitwebdatasource.cpp:
* webkit/webkitwebframe.cpp:
(WebKit::getViewFromFrame):
(WebKit::core):
(WebKit::kit):
* webkit/webkitwebframeprivate.h: Added.
* webkit/webkitwebpolicydecision.cpp:
* webkit/webkitwebview.cpp:
2010-12-09 Antonio Gomes <agomes@rim.com>
 
Reviewed by Martin Robinson.
......
......@@ -187,6 +187,7 @@ webkitgtk_sources += \
WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
WebKit/gtk/webkit/webkitwebdatasource.cpp \
WebKit/gtk/webkit/webkitwebframe.cpp \
WebKit/gtk/webkit/webkitwebframeprivate.h \
WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
WebKit/gtk/webkit/webkitwebinspector.cpp \
WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
......@@ -197,6 +198,7 @@ webkitgtk_sources += \
WebKit/gtk/webkit/webkitsecurityorigin.cpp \
WebKit/gtk/webkit/webkitwebsettings.cpp \
WebKit/gtk/webkit/webkitwebview.cpp \
WebKit/gtk/webkit/webkitwebviewprivate.h \
WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
pkgconfigdir = $(libdir)/pkgconfig
......
......@@ -50,6 +50,7 @@
#include "webkitgeolocationpolicydecision.h"
#include "webkitnetworkrequest.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
#include <glib.h>
......
......@@ -33,6 +33,7 @@
#include "PasteboardHelper.h"
#include "RenderObject.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebviewprivate.h"
#include "webkitwebview.h"
#include <gdk/gdk.h>
......
......@@ -50,6 +50,7 @@
#endif
#include "WorkerThread.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebviewprivate.h"
#include "webkitwebview.h"
#include "webkitwebframe.h"
......
......@@ -63,6 +63,7 @@
#include "webkitnetworkresponse.h"
#include "webkitprivate.h"
#include "webkitwebframe.h"
#include "webkitwebframeprivate.h"
#include "webkitwebnavigationaction.h"
#include "webkitwebpolicydecision.h"
#include "webkitwebview.h"
......
......@@ -65,31 +65,6 @@ using namespace WebCore;
namespace WebKit {
WebKitWebView* getViewFromFrame(WebKitWebFrame* frame)
{
WebKitWebFramePrivate* priv = frame->priv;
return priv->webView;
}
WebCore::Frame* core(WebKitWebFrame* frame)
{
if (!frame)
return 0;
WebKitWebFramePrivate* priv = frame->priv;
return priv ? priv->coreFrame : 0;
}
WebKitWebFrame* kit(WebCore::Frame* coreFrame)
{
if (!coreFrame)
return 0;
ASSERT(coreFrame->loader());
WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(coreFrame->loader()->client());
return client ? client->webFrame() : 0;
}
WebKitWebNavigationReason kit(WebCore::NavigationType type)
{
return (WebKitWebNavigationReason)type;
......
......@@ -82,11 +82,6 @@ namespace WebKit {
class DocumentLoader;
class PasteboardHelperGtk;
WebKitWebView* getViewFromFrame(WebKitWebFrame*);
WebCore::Frame* core(WebKitWebFrame*);
WebKitWebFrame* kit(WebCore::Frame*);
WebCore::HistoryItem* core(WebKitWebHistoryItem*);
WebKitWebHistoryItem* kit(PassRefPtr<WebCore::HistoryItem>);
......@@ -119,19 +114,6 @@ extern "C" {
#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
#define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
typedef struct _WebKitWebFramePrivate WebKitWebFramePrivate;
struct _WebKitWebFramePrivate {
WebCore::Frame* coreFrame;
WebKitWebView* webView;
gchar* name;
gchar* title;
gchar* uri;
WebKitLoadStatus loadStatus;
WebKitSecurityOrigin* origin;
};
#define WEBKIT_SECURITY_ORIGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_SECURITY_ORIGIN, WebKitSecurityOriginPrivate))
struct _WebKitSecurityOriginPrivate {
RefPtr<WebCore::SecurityOrigin> coreOrigin;
......@@ -164,9 +146,6 @@ extern "C" {
WTF::String
webkitUserAgent();
void
webkit_web_frame_core_frame_gone(WebKitWebFrame*);
// WebKitWebHistoryItem private
WebKitWebHistoryItem*
webkit_web_history_item_new_with_core_item(PassRefPtr<WebCore::HistoryItem> historyItem);
......@@ -242,10 +221,6 @@ extern "C" {
WEBKIT_API SoupMessage*
webkit_network_request_get_message(WebKitNetworkRequest* request);
// FIXME: move this functionality into a 'WebKitWebDataSource' once implemented
WEBKIT_API gchar*
webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame);
// FIXME: Move these to webkitwebframe.h once their API has been discussed.
WEBKIT_API void
......
......@@ -31,6 +31,7 @@
#include "SubstituteData.h"
#include "runtime/InitializeThreading.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebresource.h"
#include "webkitwebviewprivate.h"
#include "wtf/Assertions.h"
......
......@@ -53,6 +53,7 @@
#include "webkitenumtypes.h"
#include "webkitmarshal.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
#include <JavaScriptCore/APICast.h>
......@@ -966,3 +967,32 @@ WebKitNetworkResponse* webkit_web_frame_get_network_response(WebKitWebFrame* fra
return webkit_network_response_new_with_core_response(loader->response());
}
namespace WebKit {
WebKitWebView* getViewFromFrame(WebKitWebFrame* frame)
{
WebKitWebFramePrivate* priv = frame->priv;
return priv->webView;
}
WebCore::Frame* core(WebKitWebFrame* frame)
{
if (!frame)
return 0;
WebKitWebFramePrivate* priv = frame->priv;
return priv ? priv->coreFrame : 0;
}
WebKitWebFrame* kit(WebCore::Frame* coreFrame)
{
if (!coreFrame)
return 0;
ASSERT(coreFrame->loader());
WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(coreFrame->loader()->client());
return client ? client->webFrame() : 0;
}
}
/*
* Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
* Copyright (C) 2008 Jan Michael C. Alonzo
* Copyright (C) 2008 Collabora Ltd.
* Copyright (C) 2010 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef webkitwebframeprivate_h
#define webkitwebframeprivate_h
namespace WebKit {
WebKitWebView* getViewFromFrame(WebKitWebFrame*);
WebCore::Frame* core(WebKitWebFrame*);
WebKitWebFrame* kit(WebCore::Frame*);
}
extern "C" {
#define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
typedef struct _WebKitWebFramePrivate WebKitWebFramePrivate;
struct _WebKitWebFramePrivate {
WebCore::Frame* coreFrame;
WebKitWebView* webView;
gchar* name;
gchar* title;
gchar* uri;
WebKitLoadStatus loadStatus;
WebKitSecurityOrigin* origin;
};
void webkit_web_frame_core_frame_gone(WebKitWebFrame*);
// FIXME: move this functionality into 'WebKitWebDataSource'?
WEBKIT_API gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame*);
}
#endif
......@@ -23,6 +23,7 @@
#include "FrameLoaderTypes.h"
#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
using namespace WebKit;
using namespace WebCore;
......
......@@ -85,6 +85,7 @@
#include "webkitnetworkresponse.h"
#include "webkitprivate.h"
#include "webkitwebbackforwardlist.h"
#include "webkitwebframeprivate.h"
#include "webkitwebhistoryitem.h"
#include "webkitwebinspector.h"
#include "webkitwebviewprivate.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment