1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
/*
* Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
* Copyright (C) 2008 Jan Michael C. Alonzo
* Copyright (C) 2008, 2010 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 webkitwebviewprivate_h
#define webkitwebviewprivate_h
#include "AcceleratedCompositingContext.h"
#include "FullscreenVideoController.h"
#include "GtkClickCounter.h"
#include "GtkDragAndDropHelper.h"
#include "Page.h"
#include "ResourceHandle.h"
#include "WebViewInputMethodFilter.h"
#include "WidgetBackingStore.h"
#include <webkit/webkitwebview.h>
#include <wtf/gobject/GOwnPtr.h>
#if ENABLE(MEDIA_STREAM)
#include "UserMediaClientGtk.h"
#endif
namespace WebKit {
WebCore::Page* core(WebKitWebView*);
WebKitWebView* kit(WebCore::Page*);
}
extern "C" {
#define WEBKIT_WEB_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
struct _WebKitWebViewPrivate {
WebCore::Page* corePage;
bool hasNativeWindow;
OwnPtr<WebCore::WidgetBackingStore> backingStore;
GRefPtr<WebKitWebSettings> webSettings;
GRefPtr<WebKitWebInspector> webInspector;
GRefPtr<WebKitViewportAttributes> viewportAttributes;
GRefPtr<WebKitWebWindowFeatures> webWindowFeatures;
WebKitWebFrame* mainFrame;
GRefPtr<WebKitWebBackForwardList> backForwardList;
GtkMenu* currentMenu;
gint lastPopupXPosition;
gint lastPopupYPosition;
HashSet<GtkWidget*> children;
WebKit::WebViewInputMethodFilter imFilter;
gboolean transparent;
bool needsResizeOnMap;
#ifndef GTK_API_VERSION_2
// GtkScrollablePolicy needs to be checked when
// driving the scrollable adjustment values
GtkScrollablePolicy horizontalScrollingPolicy;
GtkScrollablePolicy verticalScrollingPolicy;
#endif
gboolean zoomFullContent;
WebKitLoadStatus loadStatus;
CString encoding;
CString customEncoding;
CString iconURI;
gboolean disposing;
#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
FullscreenVideoController* fullscreenVideoController;
#endif
// These are hosted here because the DataSource object is
// created too late in the frame loading process.
GRefPtr<WebKitWebResource> mainResource;
CString mainResourceIdentifier;
GRefPtr<GHashTable> subResources;
CString tooltipText;
WebCore::IntRect tooltipArea;
WebCore::GtkClickCounter clickCounter;
WebCore::GtkDragAndDropHelper dragAndDropHelper;
bool selfScrolling;
#if USE(ACCELERATED_COMPOSITING)
OwnPtr<WebKit::AcceleratedCompositingContext> acceleratedCompositingContext;
#endif
#if ENABLE(ICONDATABASE)
gulong iconLoadedHandler;
#endif
#if ENABLE(MEDIA_STREAM)
OwnPtr<WebKit::UserMediaClientGtk> userMediaClient;
#endif
};
void webkit_web_view_notify_ready(WebKitWebView*);
void webkit_web_view_request_download(WebKitWebView*, WebKitNetworkRequest*, const WebCore::ResourceResponse& = WebCore::ResourceResponse(), WebCore::ResourceHandle* = 0);
void webkit_web_view_add_resource(WebKitWebView*, const char*, WebKitWebResource*);
void webkit_web_view_add_main_resource(WebKitWebView*, const char*, WebKitWebResource*);
void webkit_web_view_remove_resource(WebKitWebView*, const char*);
WebKitWebResource* webkit_web_view_get_resource(WebKitWebView*, char*);
WebKitWebResource* webkit_web_view_get_main_resource(WebKitWebView*);
void webkit_web_view_clear_resources(WebKitWebView*);
GList* webkit_web_view_get_subresources(WebKitWebView*);
void webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
GtkMenu* webkit_web_view_get_context_menu(WebKitWebView*);
void webViewEnterFullscreen(WebKitWebView* webView, WebCore::Node*);
void webViewExitFullscreen(WebKitWebView* webView);
#if ENABLE(ICONDATABASE)
void webkitWebViewRegisterForIconNotification(WebKitWebView*, bool shouldRegister);
void webkitWebViewIconLoaded(WebKitFaviconDatabase*, const char* frameURI, WebKitWebView*);
#endif
}
#endif
|