summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 05:11:03 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 05:11:03 +0000
commit50ae00ef9da3304a68d9f811380572a5e2ed03cb (patch)
treee58480c200f54468e61635a134cb6b51fb7809df /webkit/glue
parenta9e8a092db75a1aff5e03d29215390ade65dec1e (diff)
downloadchromium_src-50ae00ef9da3304a68d9f811380572a5e2ed03cb.zip
chromium_src-50ae00ef9da3304a68d9f811380572a5e2ed03cb.tar.gz
chromium_src-50ae00ef9da3304a68d9f811380572a5e2ed03cb.tar.bz2
Delete glue/webview{_delegate}.h
R=dglazkov BUG=10033 TEST=none Review URL: http://codereview.chromium.org/293001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/back_forward_list_client_impl.cc1
-rw-r--r--webkit/glue/chrome_client_impl.cc44
-rw-r--r--webkit/glue/context_menu_client_impl.cc1
-rw-r--r--webkit/glue/context_menu_unittest.cc3
-rw-r--r--webkit/glue/cpp_bound_class_unittest.cc2
-rw-r--r--webkit/glue/dom_operations.cc1
-rw-r--r--webkit/glue/dom_operations.h23
-rw-r--r--webkit/glue/dom_operations_private.h2
-rw-r--r--webkit/glue/dom_operations_unittest.cc2
-rw-r--r--webkit/glue/dom_serializer_unittest.cc2
-rw-r--r--webkit/glue/dragclient_impl.cc2
-rw-r--r--webkit/glue/editor_client_impl.cc2
-rw-r--r--webkit/glue/iframe_redirect_unittest.cc2
-rw-r--r--webkit/glue/inspector_client_impl.cc1
-rw-r--r--webkit/glue/mimetype_unittest.cc2
-rw-r--r--webkit/glue/resource_fetcher_unittest.cc2
-rw-r--r--webkit/glue/webaccessibilitymanager.h7
-rw-r--r--webkit/glue/webaccessibilitymanager_impl.cc1
-rw-r--r--webkit/glue/webaccessibilitymanager_impl.h5
-rw-r--r--webkit/glue/webdevtoolsclient.h4
-rw-r--r--webkit/glue/webdevtoolsclient_impl.cc1
-rw-r--r--webkit/glue/webframe_impl.cc1
-rw-r--r--webkit/glue/webframe_impl.h4
-rw-r--r--webkit/glue/webframe_unittest.cc4
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc1
-rw-r--r--webkit/glue/webframeloaderclient_impl.h1
-rw-r--r--webkit/glue/webkit_glue.cc1
-rw-r--r--webkit/glue/webkit_glue.h4
-rw-r--r--webkit/glue/webkitclient_impl.cc3
-rw-r--r--webkit/glue/webplugin_impl.cc3
-rw-r--r--webkit/glue/webpreferences.cc3
-rw-r--r--webkit/glue/webpreferences.h4
-rw-r--r--webkit/glue/webview.h56
-rw-r--r--webkit/glue/webview_delegate.h37
-rw-r--r--webkit/glue/webview_impl.cc65
-rw-r--r--webkit/glue/webview_impl.h28
-rw-r--r--webkit/glue/webview_unittest.cc4
-rw-r--r--webkit/glue/webworker_impl.cc6
-rw-r--r--webkit/glue/webworker_impl.h6
39 files changed, 133 insertions, 208 deletions
diff --git a/webkit/glue/back_forward_list_client_impl.cc b/webkit/glue/back_forward_list_client_impl.cc
index 0155009..c6a0661 100644
--- a/webkit/glue/back_forward_list_client_impl.cc
+++ b/webkit/glue/back_forward_list_client_impl.cc
@@ -7,6 +7,7 @@
#include "HistoryItem.h"
#undef LOG
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/glue/back_forward_list_client_impl.h"
#include "webkit/glue/webview_impl.h"
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index 90c4e49..4cffba2 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -48,7 +48,6 @@
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpopupmenu_impl.h"
-#include "webkit/glue/webview_delegate.h"
#include "webkit/glue/webview_impl.h"
using WebCore::PopupContainer;
@@ -245,28 +244,27 @@ static inline bool CurrentEventShouldCauseBackgroundTab(
}
void ChromeClientImpl::show() {
- WebViewDelegate* delegate = webview_->delegate();
- if (delegate) {
- // If our default configuration was modified by a script or wasn't
- // created by a user gesture, then show as a popup. Else, let this
- // new window be opened as a toplevel window.
- //
- bool as_popup =
- !toolbars_visible_ ||
- !statusbar_visible_ ||
- !scrollbars_visible_ ||
- !menubar_visible_ ||
- !resizable_;
-
- WebNavigationPolicy policy = WebKit::WebNavigationPolicyNewForegroundTab;
- if (as_popup)
- policy = WebKit::WebNavigationPolicyNewPopup;
- if (CurrentEventShouldCauseBackgroundTab(
- WebViewImpl::current_input_event()))
- policy = WebKit::WebNavigationPolicyNewBackgroundTab;
-
- delegate->show(policy);
- }
+ if (!webview_->client())
+ return;
+
+ // If our default configuration was modified by a script or wasn't
+ // created by a user gesture, then show as a popup. Else, let this
+ // new window be opened as a toplevel window.
+ bool as_popup =
+ !toolbars_visible_ ||
+ !statusbar_visible_ ||
+ !scrollbars_visible_ ||
+ !menubar_visible_ ||
+ !resizable_;
+
+ WebNavigationPolicy policy = WebKit::WebNavigationPolicyNewForegroundTab;
+ if (as_popup)
+ policy = WebKit::WebNavigationPolicyNewPopup;
+ if (CurrentEventShouldCauseBackgroundTab(
+ WebViewImpl::current_input_event()))
+ policy = WebKit::WebNavigationPolicyNewBackgroundTab;
+
+ webview_->client()->show(policy);
}
bool ChromeClientImpl::canRunModal() {
diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc
index 57f8c87..15187fe 100644
--- a/webkit/glue/context_menu_client_impl.cc
+++ b/webkit/glue/context_menu_client_impl.cc
@@ -28,6 +28,7 @@
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebURLResponse.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/api/src/WebDataSourceImpl.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/context_menu_client_impl.h"
diff --git a/webkit/glue/context_menu_unittest.cc b/webkit/glue/context_menu_unittest.cc
index 61cc229..9b00769 100644
--- a/webkit/glue/context_menu_unittest.cc
+++ b/webkit/glue/context_menu_unittest.cc
@@ -10,12 +10,13 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/test_shell_test.h"
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
+using WebKit::WebView;
// Right clicking inside on an iframe should produce a context menu
class ContextMenuCapturing : public TestShellTest {
diff --git a/webkit/glue/cpp_bound_class_unittest.cc b/webkit/glue/cpp_bound_class_unittest.cc
index 919ffc5..5edb23d 100644
--- a/webkit/glue/cpp_bound_class_unittest.cc
+++ b/webkit/glue/cpp_bound_class_unittest.cc
@@ -12,9 +12,9 @@
#include "webkit/api/public/WebData.h"
#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebURL.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/cpp_binding_example.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/test_shell_test.h"
using WebKit::WebFrame;
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index 298933d..78d9fea 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -39,6 +39,7 @@ MSVC_POP_WARNING();
using WebCore::String;
using WebKit::WebFrame;
+using WebKit::WebView;
namespace {
diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h
index 1694f4d..af188fc 100644
--- a/webkit/glue/dom_operations.h
+++ b/webkit/glue/dom_operations.h
@@ -18,9 +18,12 @@ class HTMLInputElement;
class Node;
}
+namespace WebKit {
+class WebView;
+}
+
struct FormData;
class WebFrameImpl;
-class WebView;
// A collection of operations that access the underlying WebKit DOM directly.
namespace webkit_glue {
@@ -47,14 +50,14 @@ struct FileUploadData {
FormValueMap other_form_values;
};
-bool FillFormToUploadFile(WebView* view, const FileUploadData& data);
+bool FillFormToUploadFile(WebKit::WebView* view, const FileUploadData& data);
// Fill in a form identified by form |data|.
-bool FillForm(WebView* view, const FormData& data);
+bool FillForm(WebKit::WebView* view, const FormData& data);
// Fill matching password forms and trigger autocomplete in the case of multiple
// matching logins.
-void FillPasswordForm(WebView* view,
+void FillPasswordForm(WebKit::WebView* view,
const PasswordFormDomManager::FillData& data);
// Structure for storage the result of getting all savable resource links
@@ -86,7 +89,7 @@ struct SavableResourcesResult {
// and sub-frame. After collecting all savable resource links, this function
// will send those links to embedder. Return value indicates whether we get
// all saved resource links successfully.
-bool GetAllSavableResourceLinksForCurrentPage(WebView* view,
+bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view,
const GURL& page_url, SavableResourcesResult* savable_resources_result,
const char** savable_schemes);
@@ -127,12 +130,12 @@ bool ParseIconSizes(const std::wstring& text,
// Gets the application info for the specified page. See the description of
// WebApplicationInfo for details as to where each field comes from.
-void GetApplicationInfo(WebView* view, WebApplicationInfo* app_info);
+void GetApplicationInfo(WebKit::WebView* view, WebApplicationInfo* app_info);
// Invokes pauseAnimationAtTime on the AnimationController associated with the
// |view|s main frame.
// This is used by test shell.
-bool PauseAnimationAtTimeOnElementWithId(WebView* view,
+bool PauseAnimationAtTimeOnElementWithId(WebKit::WebView* view,
const std::string& animation_name,
double time,
const std::string& element_id);
@@ -140,18 +143,18 @@ bool PauseAnimationAtTimeOnElementWithId(WebView* view,
// Invokes pauseTransitionAtTime on the AnimationController associated with the
// |view|s main frame.
// This is used by test shell.
-bool PauseTransitionAtTimeOnElementWithId(WebView* view,
+bool PauseTransitionAtTimeOnElementWithId(WebKit::WebView* view,
const std::string& property_name,
double time,
const std::string& element_id);
// Returns true if the element with |element_id| as its id has autocomplete
// on.
-bool ElementDoesAutoCompleteForElementWithId(WebView* view,
+bool ElementDoesAutoCompleteForElementWithId(WebKit::WebView* view,
const std::string& element_id);
// Returns the number of animations currently running.
-int NumberOfActiveAnimations(WebView* view);
+int NumberOfActiveAnimations(WebKit::WebView* view);
// Returns the passed element/node casted to an HTMLInputElement if it is one,
// NULL if it is not an HTMLInputElement.
diff --git a/webkit/glue/dom_operations_private.h b/webkit/glue/dom_operations_private.h
index 460cdcb..3173361 100644
--- a/webkit/glue/dom_operations_private.h
+++ b/webkit/glue/dom_operations_private.h
@@ -54,7 +54,7 @@ bool ElementHasLegalLinkAttribute(const WebCore::Element* element,
const WebCore::QualifiedName& attr_name);
// Get pointer of WebFrameImpl from webview according to specific URL.
-WebFrameImpl* GetWebFrameImplFromWebViewForSpecificURL(WebView* view,
+WebFrameImpl* GetWebFrameImplFromWebViewForSpecificURL(WebKit::WebView* view,
const GURL& page_url);
} // namespace webkit_glue
diff --git a/webkit/glue/dom_operations_unittest.cc b/webkit/glue/dom_operations_unittest.cc
index 92955da..5cfd9d3 100644
--- a/webkit/glue/dom_operations_unittest.cc
+++ b/webkit/glue/dom_operations_unittest.cc
@@ -7,8 +7,8 @@
#include "base/string_util.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request_context.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/dom_operations.h"
-#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_shell_test.h"
diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc
index f62f01fb..67cb4e9 100644
--- a/webkit/glue/dom_serializer_unittest.cc
+++ b/webkit/glue/dom_serializer_unittest.cc
@@ -31,13 +31,13 @@ MSVC_POP_WARNING();
#include "net/url_request/url_request_context.h"
#include "webkit/api/public/WebData.h"
#include "webkit/api/public/WebURL.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/dom_operations_private.h"
#include "webkit/glue/dom_serializer.h"
#include "webkit/glue/dom_serializer_delegate.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webframe_impl.h"
-#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_shell_test.h"
diff --git a/webkit/glue/dragclient_impl.cc b/webkit/glue/dragclient_impl.cc
index cb29825..0f8ae18 100644
--- a/webkit/glue/dragclient_impl.cc
+++ b/webkit/glue/dragclient_impl.cc
@@ -10,9 +10,9 @@
#undef LOG
#include "webkit/api/public/WebDragData.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/glue/dragclient_impl.h"
#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webview_impl.h"
using WebKit::WebDragData;
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index bbcadc46..c42656e 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -28,11 +28,11 @@
#include "webkit/api/public/WebNode.h"
#include "webkit/api/public/WebRange.h"
#include "webkit/api/public/WebTextAffinity.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/glue/autofill_form.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/editor_client_impl.h"
#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webview.h"
#include "webkit/glue/webview_impl.h"
using WebKit::WebEditingAction;
diff --git a/webkit/glue/iframe_redirect_unittest.cc b/webkit/glue/iframe_redirect_unittest.cc
index 4475735..23d4fdb 100644
--- a/webkit/glue/iframe_redirect_unittest.cc
+++ b/webkit/glue/iframe_redirect_unittest.cc
@@ -15,8 +15,8 @@
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebVector.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/test_shell_test.h"
using WebKit::WebDataSource;
diff --git a/webkit/glue/inspector_client_impl.cc b/webkit/glue/inspector_client_impl.cc
index 6e58a87..604118d 100644
--- a/webkit/glue/inspector_client_impl.cc
+++ b/webkit/glue/inspector_client_impl.cc
@@ -22,6 +22,7 @@ MSVC_POP_WARNING();
#include "webkit/api/public/WebRect.h"
#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebURLRequest.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/inspector_client_impl.h"
#include "webkit/glue/webdevtoolsagent_impl.h"
diff --git a/webkit/glue/mimetype_unittest.cc b/webkit/glue/mimetype_unittest.cc
index 36a59dd..cc4b793 100644
--- a/webkit/glue/mimetype_unittest.cc
+++ b/webkit/glue/mimetype_unittest.cc
@@ -11,9 +11,9 @@
#include "base/string_util.h"
#include "net/url_request/url_request_unittest.h"
#include "webkit/api/public/WebFrame.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/unittest_test_server.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/test_shell_test.h"
using WebKit::WebFrame;
diff --git a/webkit/glue/resource_fetcher_unittest.cc b/webkit/glue/resource_fetcher_unittest.cc
index dc98fc6..daa88cf 100644
--- a/webkit/glue/resource_fetcher_unittest.cc
+++ b/webkit/glue/resource_fetcher_unittest.cc
@@ -8,8 +8,8 @@
#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebURLResponse.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/unittest_test_server.h"
-#include "webkit/glue/webview.h"
#include "webkit/glue/resource_fetcher.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_shell_test.h"
diff --git a/webkit/glue/webaccessibilitymanager.h b/webkit/glue/webaccessibilitymanager.h
index 04c1685..2debcb7 100644
--- a/webkit/glue/webaccessibilitymanager.h
+++ b/webkit/glue/webaccessibilitymanager.h
@@ -9,9 +9,8 @@
namespace WebKit {
class WebAccessibilityObject;
-}
-
class WebView;
+}
////////////////////////////////////////////////////////////////////////////////
//
@@ -35,7 +34,7 @@ class WebAccessibilityManager {
// calling into WebKit's AccessibilityObject. Maintains a hashmap of the
// currently active (browser side ref-count non-zero) instances. Returns true
// if successful, false otherwise.
- virtual bool GetAccObjInfo(WebView* view,
+ virtual bool GetAccObjInfo(WebKit::WebView* view,
const WebAccessibility::InParams& in_params,
WebAccessibility::OutParams* out_params) = 0;
@@ -53,7 +52,7 @@ class WebAccessibilityManager {
// initialize the root of the GlueAccessibilityObject tree with the
// associated accessibility information. Returns true if successful, false
// otherwise.
- virtual bool InitAccObjRoot(WebView* view) = 0;
+ virtual bool InitAccObjRoot(WebKit::WebView* view) = 0;
DISALLOW_COPY_AND_ASSIGN(WebAccessibilityManager);
};
diff --git a/webkit/glue/webaccessibilitymanager_impl.cc b/webkit/glue/webaccessibilitymanager_impl.cc
index be4e9a0..fde40b3 100644
--- a/webkit/glue/webaccessibilitymanager_impl.cc
+++ b/webkit/glue/webaccessibilitymanager_impl.cc
@@ -19,6 +19,7 @@
#include "webkit/glue/webview_impl.h"
using WebKit::WebAccessibilityObject;
+using WebKit::WebView;
namespace webkit_glue {
diff --git a/webkit/glue/webaccessibilitymanager_impl.h b/webkit/glue/webaccessibilitymanager_impl.h
index a92fd21..c95ec5f 100644
--- a/webkit/glue/webaccessibilitymanager_impl.h
+++ b/webkit/glue/webaccessibilitymanager_impl.h
@@ -26,7 +26,8 @@ namespace webkit_glue {
class WebAccessibilityManagerImpl : public WebAccessibilityManager {
public:
// From WebAccessibilityManager.
- bool GetAccObjInfo(WebView* view, const WebAccessibility::InParams& in_params,
+ bool GetAccObjInfo(WebKit::WebView* view,
+ const WebAccessibility::InParams& in_params,
WebAccessibility::OutParams* out_params);
bool ClearAccObjMap(int acc_obj_id, bool clear_all);
int FocusAccObj(const WebKit::WebAccessibilityObject& object);
@@ -43,7 +44,7 @@ class WebAccessibilityManagerImpl : public WebAccessibilityManager {
private:
// From WebAccessibilityManager.
- bool InitAccObjRoot(WebView* view);
+ bool InitAccObjRoot(WebKit::WebView* view);
// Wrapper around the pointer that holds the root of the AccessibilityObject
// tree, to allow the use of a scoped_refptr.
diff --git a/webkit/glue/webdevtoolsclient.h b/webkit/glue/webdevtoolsclient.h
index 5b1d11e..75e4c6c 100644
--- a/webkit/glue/webdevtoolsclient.h
+++ b/webkit/glue/webdevtoolsclient.h
@@ -8,10 +8,10 @@
#include "base/basictypes.h"
class WebDevToolsClientDelegate;
-class WebView;
namespace WebKit {
class WebString;
+class WebView;
}
// WebDevToolsClient represents DevTools client sitting in the Glue. It provides
@@ -19,7 +19,7 @@ class WebString;
class WebDevToolsClient {
public:
static WebDevToolsClient* Create(
- WebView* view,
+ WebKit::WebView* view,
WebDevToolsClientDelegate* delegate,
const WebKit::WebString& application_locale);
diff --git a/webkit/glue/webdevtoolsclient_impl.cc b/webkit/glue/webdevtoolsclient_impl.cc
index c5dca05..374f05d 100644
--- a/webkit/glue/webdevtoolsclient_impl.cc
+++ b/webkit/glue/webdevtoolsclient_impl.cc
@@ -40,6 +40,7 @@ using namespace WebCore;
using WebKit::WebFrame;
using WebKit::WebScriptSource;
using WebKit::WebString;
+using WebKit::WebView;
static v8::Local<v8::String> ToV8String(const String& s) {
if (s.isNull())
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 7a18b0b..801af55 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -234,6 +234,7 @@ using WebKit::WebURLError;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
using WebKit::WebVector;
+using WebKit::WebView;
// Key for a StatsCounter tracking how many WebFrames are active.
static const char* const kWebFrameActiveCount = "WebFrameActiveCount";
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index f840df4..a5d0794 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -41,7 +41,6 @@ MSVC_PUSH_WARNING_LEVEL(0);
MSVC_POP_WARNING();
class ChromePrintContext;
-class WebView;
class WebViewImpl;
namespace gfx {
@@ -62,6 +61,7 @@ struct WindowFeatures;
namespace WebKit {
class WebDataSourceImpl;
class WebFrameClient;
+class WebView;
}
// Implementation of WebFrame, note that this is a reference counted object.
@@ -76,7 +76,7 @@ class WebFrameImpl : public WebKit::WebFrame, public RefCounted<WebFrameImpl> {
virtual WebKit::WebSize contentsSize() const;
virtual int contentsPreferredWidth() const;
virtual bool hasVisibleContent() const;
- virtual WebView* view() const;
+ virtual WebKit::WebView* view() const;
virtual WebKit::WebFrame* opener() const;
virtual WebKit::WebFrame* parent() const;
virtual WebKit::WebFrame* top() const;
diff --git a/webkit/glue/webframe_unittest.cc b/webkit/glue/webframe_unittest.cc
index b2a71b4..1faf22f 100644
--- a/webkit/glue/webframe_unittest.cc
+++ b/webkit/glue/webframe_unittest.cc
@@ -8,14 +8,14 @@
#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
-#include "webkit/glue/webview.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/tools/test_shell/test_shell_test.h"
using WebKit::WebFrame;
using WebKit::WebString;
+using WebKit::WebView;
class WebFrameTest : public TestShellTest {
- public:
};
TEST_F(WebFrameTest, GetContentAsPlainText) {
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index 3fe52c62..0d83c5c 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -35,6 +35,7 @@
#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebURLError.h"
#include "webkit/api/public/WebVector.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/api/src/WebDataSourceImpl.h"
#include "webkit/api/src/WebPluginContainerImpl.h"
#include "webkit/api/src/WebPluginLoadObserver.h"
diff --git a/webkit/glue/webframeloaderclient_impl.h b/webkit/glue/webframeloaderclient_impl.h
index aad5d8f..fdf5de7 100644
--- a/webkit/glue/webframeloaderclient_impl.h
+++ b/webkit/glue/webframeloaderclient_impl.h
@@ -11,7 +11,6 @@
#include <wtf/RefPtr.h>
#include "webkit/api/public/WebNavigationPolicy.h"
-#include "webkit/glue/webview_delegate.h"
class WebFrameImpl;
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 2136b22..63bc486 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -56,6 +56,7 @@ using WebKit::WebFrame;
using WebKit::WebHistoryItem;
using WebKit::WebString;
using WebKit::WebVector;
+using WebKit::WebView;
namespace {
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index 68040b3..d4d506a 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -21,7 +21,6 @@
class GURL;
class SkBitmap;
-class WebView;
struct WebPluginInfo;
namespace base {
@@ -35,6 +34,7 @@ class PlatformCanvas;
namespace WebKit {
class WebFrame;
class WebString;
+class WebView;
}
namespace webkit_glue {
@@ -67,7 +67,7 @@ std::wstring DumpHistoryState(const std::string& history_state, int indent,
bool is_current);
// Cleans up state left over from the previous test run.
-void ResetBeforeTestRun(WebView* view);
+void ResetBeforeTestRun(WebKit::WebView* view);
// Returns the WebKit version (major.minor).
std::string GetWebKitVersion();
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 7b3dde924..d36f043 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -28,6 +28,7 @@
#include "webkit/api/public/WebPluginListBuilder.h"
#include "webkit/api/public/WebScreenInfo.h"
#include "webkit/api/public/WebString.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/glue/chrome_client_impl.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/plugins/plugin_instance.h"
@@ -72,7 +73,7 @@ WebWidgetClient* ToWebWidgetClient(WebCore::Widget* widget) {
ChromeClientImpl* chrome_client = ToChromeClient(widget);
if (!chrome_client || !chrome_client->webview())
return NULL;
- return chrome_client->webview()->delegate();
+ return chrome_client->webview()->client();
}
}
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 22ba10b..7d4bbdc 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -26,13 +26,13 @@
#include "webkit/api/public/WebURLLoader.h"
#include "webkit/api/public/WebURLLoaderClient.h"
#include "webkit/api/public/WebURLResponse.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/multipart_response_delegate.h"
#include "webkit/glue/webplugin_impl.h"
#include "webkit/glue/plugins/plugin_host.h"
#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/webplugin_delegate.h"
#include "webkit/glue/webplugin_page_delegate.h"
-#include "webkit/glue/webview.h"
#include "googleurl/src/gurl.h"
using WebKit::WebCanvas;
@@ -58,6 +58,7 @@ using WebKit::WebURLLoaderClient;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
using WebKit::WebVector;
+using WebKit::WebView;
using webkit_glue::MultipartResponseDelegate;
namespace webkit_glue {
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index b134db2..df6610b 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -9,12 +9,13 @@
#include "webkit/api/public/WebSettings.h"
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webview.h"
using WebKit::WebSettings;
using WebKit::WebString;
using WebKit::WebURL;
+using WebKit::WebView;
void WebPreferences::Apply(WebView* web_view) const {
WebSettings* settings = web_view->settings();
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index feae9f2..b9d291d 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -14,7 +14,9 @@
#include <string>
#include "googleurl/src/gurl.h"
+namespace WebKit {
class WebView;
+}
struct WebPreferences {
std::wstring standard_font_family;
@@ -103,7 +105,7 @@ struct WebPreferences {
experimental_notifications_enabled(false) {
}
- void Apply(WebView* web_view) const;
+ void Apply(WebKit::WebView* web_view) const;
};
#endif // WEBKIT_GLUE_WEBPREFERENCES_H__
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
deleted file mode 100644
index 765b6f4..0000000
--- a/webkit/glue/webview.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2009 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.
-
-#ifndef WEBKIT_GLUE_WEBVIEW_H_
-#define WEBKIT_GLUE_WEBVIEW_H_
-
-#include "base/basictypes.h"
-#include "webkit/api/public/WebView.h"
-
-class WebViewDelegate;
-
-//
-// @class WebView
-// WebView manages the interaction between WebFrameViews and WebDataSources.
-// Modification of the policies and behavior of the WebKit is largely managed
-// by WebViews and their delegates.
-//
-// Typical usage:
-//
-// WebView *webView;
-// WebFrame *mainFrame;
-//
-// webView = [[WebView alloc] initWithFrame: NSMakeRect (0,0,640,480)];
-// mainFrame = [webView mainFrame];
-// [mainFrame loadRequest:request];
-//
-// WebViews have a WebViewDelegate that the embedding application implements
-// that are required for tasks like opening new windows and controlling the
-// user interface elements in those windows, monitoring the progress of loads,
-// monitoring URL changes, and making determinations about how content of
-// certain types should be handled.
-class WebView : public WebKit::WebView {
- public:
- WebView() {}
- virtual ~WebView() {}
-
- // This method creates a WebView that is NOT yet initialized. You will need
- // to call InitializeMainFrame to finish the initialization. You may pass
- // NULL for the editing_client parameter if you are not interested in those
- // notifications.
- static WebView* Create(WebViewDelegate* delegate);
-
- // Tells all Page instances of this view to update the visited link state for
- // the specified hash.
- static void UpdateVisitedLinkState(uint64 link_hash);
-
- // Tells all Page instances of this view to update visited state for all their
- // links.
- static void ResetVisitedLinkState();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebView);
-};
-
-#endif // WEBKIT_GLUE_WEBVIEW_H_
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
deleted file mode 100644
index 5c9e3d7..0000000
--- a/webkit/glue/webview_delegate.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2006-2009 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.
-
-// WebCore provides hooks for several kinds of functionality, allowing separate
-// classes termed "delegates" to receive notifications (in the form of direct
-// function calls) when certain events are about to occur or have just occurred.
-// In some cases, the delegate implements the needed functionality; in others,
-// the delegate has some control over the behavior but doesn't actually
-// implement it. For example, the UI delegate is responsible for showing a
-// dialog box or otherwise handling a JavaScript window.alert() call, via the
-// RunJavaScriptAlert() method. On the other hand, the editor delegate doesn't
-// actually handle editing functionality, although it could (for example)
-// override whether a content-editable node accepts editing focus by returning
-// false from ShouldBeginEditing(). (It would also possible for a more
-// special-purpose editing delegate to act on the edited node in some way, e.g.
-// to highlight modified text in the DidChangeContents() method.)
-
-// WebKit divides the delegated tasks into several different classes, but we
-// combine them into a single WebViewDelegate. This single delegate encompasses
-// the needed functionality of the WebKit UIDelegate, ContextMenuDelegate,
-// PolicyDelegate, FrameLoadDelegate, and EditorDelegate; additional portions
-// of ChromeClient and FrameLoaderClient not delegated in the WebKit
-// implementation; and some WebView additions.
-
-#ifndef WEBKIT_GLUE_WEBVIEW_DELEGATE_H_
-#define WEBKIT_GLUE_WEBVIEW_DELEGATE_H_
-
-#include "webkit/api/public/WebViewClient.h"
-
-// TODO(darin): Eliminate WebViewDelegate in favor of WebViewClient.
-class WebViewDelegate : public WebKit::WebViewClient {
- protected:
- ~WebViewDelegate() { }
-};
-
-#endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 5c9b322..e0340bd 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -70,6 +70,7 @@ MSVC_POP_WARNING();
#include "webkit/api/public/WebRect.h"
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebVector.h"
+#include "webkit/api/public/WebViewClient.h"
#include "webkit/api/src/WebInputEventConversion.h"
#include "webkit/api/src/WebSettingsImpl.h"
#include "webkit/glue/dom_operations.h"
@@ -81,7 +82,6 @@ MSVC_POP_WARNING();
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpopupmenu_impl.h"
#include "webkit/glue/webdevtoolsclient.h"
-#include "webkit/glue/webview_delegate.h"
#include "webkit/glue/webview_impl.h"
// Get rid of WTF's pow define so we can use std::pow.
@@ -126,6 +126,7 @@ using WebKit::WebTextDirectionLeftToRight;
using WebKit::WebTextDirectionRightToLeft;
using WebKit::WebURL;
using WebKit::WebVector;
+using WebKit::WebViewClient;
using webkit_glue::AccessibilityObjectToWebAccessibilityObject;
@@ -341,13 +342,29 @@ static const WebCore::PopupContainerSettings kAutocompletePopupSettings = {
// WebView ----------------------------------------------------------------
-/*static*/
-WebView* WebView::Create(WebViewDelegate* delegate) {
- WebViewImpl* instance = new WebViewImpl(delegate);
+namespace WebKit {
+
+// static
+WebView* WebView::create(WebViewClient* client) {
+ WebViewImpl* instance = new WebViewImpl(client);
instance->AddRef();
return instance;
}
+// static
+void WebView::updateVisitedLinkState(unsigned long long link_hash) {
+ WebCore::Page::visitedStateChanged(
+ WebCore::PageGroup::pageGroup(pageGroupName), link_hash);
+}
+
+// static
+void WebView::resetVisitedLinkState() {
+ WebCore::Page::allVisitedStateChanged(
+ WebCore::PageGroup::pageGroup(pageGroupName));
+}
+
+} // namespace WebKit
+
void WebViewImpl::initializeMainFrame(WebFrameClient* frame_client) {
// NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame
// and releases that reference once the corresponding Frame is destroyed.
@@ -355,8 +372,8 @@ void WebViewImpl::initializeMainFrame(WebFrameClient* frame_client) {
main_frame->InitMainFrame(this);
- if (client()) {
- WebDevToolsAgentClient* tools_client = client()->devToolsAgentClient();
+ if (client_) {
+ WebDevToolsAgentClient* tools_client = client_->devToolsAgentClient();
if (tools_client)
devtools_agent_.reset(new WebDevToolsAgentImpl(this, tools_client));
}
@@ -367,20 +384,8 @@ void WebViewImpl::initializeMainFrame(WebFrameClient* frame_client) {
SecurityOrigin::AllowLocalLoadsForLocalOnly);
}
-// static
-void WebView::UpdateVisitedLinkState(uint64 link_hash) {
- WebCore::Page::visitedStateChanged(
- WebCore::PageGroup::pageGroup(pageGroupName), link_hash);
-}
-
-// static
-void WebView::ResetVisitedLinkState() {
- WebCore::Page::allVisitedStateChanged(
- WebCore::PageGroup::pageGroup(pageGroupName));
-}
-
-WebViewImpl::WebViewImpl(WebViewDelegate* delegate)
- : delegate_(delegate),
+WebViewImpl::WebViewImpl(WebViewClient* client)
+ : client_(client),
ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(chrome_client_impl_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(context_menu_client_impl_(this)),
@@ -464,7 +469,7 @@ void WebViewImpl::MouseLeave(const WebMouseEvent& event) {
if (!main_frame() || !main_frame()->frameview())
return;
- client()->setMouseOverURL(WebURL());
+ client_->setMouseOverURL(WebURL());
main_frame()->frame()->eventHandler()->handleMouseMoveEvent(
PlatformMouseEventBuilder(main_frame()->frameview(), event));
@@ -684,7 +689,7 @@ bool WebViewImpl::AutocompleteHandleKeyEvent(const WebKeyboardEvent& event) {
input_element->name());
const WebString& value = webkit_glue::StringToWebString(
autocomplete_popup_client_->itemText(selected_index));
- client()->removeAutofillSuggestions(name, value);
+ client_->removeAutofillSuggestions(name, value);
// Update the entries in the currently showing popup to reflect the
// deletion.
autocomplete_popup_client_->RemoveItemAtIndex(selected_index);
@@ -974,9 +979,9 @@ void WebViewImpl::close() {
// Reset the delegate to prevent notifications being sent as we're being
// deleted.
- delegate_ = NULL;
+ client_ = NULL;
- Release(); // Balances AddRef from WebView::Create
+ Release(); // Balances AddRef from WebView::create
}
void WebViewImpl::resize(const WebSize& new_size) {
@@ -989,9 +994,9 @@ void WebViewImpl::resize(const WebSize& new_size) {
main_frame()->frame()->eventHandler()->sendResizeEvent();
}
- if (delegate_) {
+ if (client_) {
WebRect damaged_rect(0, 0, size_.width, size_.height);
- delegate_->didInvalidateRect(damaged_rect);
+ client_->didInvalidateRect(damaged_rect);
}
}
@@ -1831,11 +1836,11 @@ bool WebViewImpl::NavigationPolicyFromMouseEvent(unsigned short button,
void WebViewImpl::StartDragging(const WebPoint& event_pos,
const WebDragData& drag_data,
WebDragOperationsMask mask) {
- if (!client())
+ if (!client_)
return;
DCHECK(!doing_drag_and_drop_);
doing_drag_and_drop_ = true;
- client()->startDragging(event_pos, drag_data, mask);
+ client_->startDragging(event_pos, drag_data, mask);
}
void WebViewImpl::SetCurrentHistoryItem(WebCore::HistoryItem* item) {
@@ -1871,8 +1876,8 @@ void WebViewImpl::SetIgnoreInputEvents(bool new_value) {
#if ENABLE(NOTIFICATIONS)
WebKit::NotificationPresenterImpl* WebViewImpl::GetNotificationPresenter() {
- if (!notification_presenter_.isInitialized() && client())
- notification_presenter_.initialize(client()->notificationPresenter());
+ if (!notification_presenter_.isInitialized() && client_)
+ notification_presenter_.initialize(client_->notificationPresenter());
return &notification_presenter_;
}
#endif
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 35eaf44..a995e6a 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -17,6 +17,7 @@
#include "webkit/api/public/WebPoint.h"
#include "webkit/api/public/WebSize.h"
#include "webkit/api/public/WebString.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/api/src/NotificationPresenterImpl.h"
#include "webkit/glue/back_forward_list_client_impl.h"
#include "webkit/glue/chrome_client_impl.h"
@@ -26,7 +27,6 @@
#include "webkit/glue/inspector_client_impl.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/glue/webview.h"
namespace WebCore {
class ChromiumDataObject;
@@ -58,9 +58,9 @@ class AutocompletePopupMenuClient;
class SearchableFormData;
class WebHistoryItemImpl;
class WebDevToolsAgentImpl;
-class WebViewDelegate;
-class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
+class WebViewImpl : public WebKit::WebView,
+ public base::RefCounted<WebViewImpl> {
public:
// WebWidget methods:
virtual void close();
@@ -144,12 +144,11 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
int defaultSuggestionIndex);
virtual void hideAutofillPopup();
- // WebView methods:
- virtual void SetIgnoreInputEvents(bool new_value);
- WebDevToolsAgentImpl* GetWebDevToolsAgentImpl();
-
// WebViewImpl
+ void SetIgnoreInputEvents(bool new_value);
+ WebDevToolsAgentImpl* GetWebDevToolsAgentImpl();
+
const WebKit::WebPoint& last_mouse_down_point() const {
return last_mouse_down_point_;
}
@@ -162,12 +161,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
static WebViewImpl* FromPage(WebCore::Page* page);
WebKit::WebViewClient* client() {
- return delegate_;
- }
-
- // TODO(darin): Remove this method in favor of client().
- WebViewDelegate* delegate() {
- return delegate_;
+ return client_;
}
// Returns the page object associated with this view. This may be NULL when
@@ -257,17 +251,17 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
WebCore::ScrollGranularity scroll_granularity);
protected:
- friend class WebView; // So WebView::Create can call our constructor
+ friend class WebKit::WebView; // So WebView::Create can call our constructor
friend class base::RefCounted<WebViewImpl>;
- WebViewImpl(WebViewDelegate* delegate);
+ WebViewImpl(WebKit::WebViewClient* client);
~WebViewImpl();
void ModifySelection(uint32 message,
WebCore::Frame* frame,
const WebCore::PlatformKeyboardEvent& e);
- WebViewDelegate* delegate_;
+ WebKit::WebViewClient* client_;
webkit_glue::BackForwardListClientImpl back_forward_list_client_impl_;
ChromeClientImpl chrome_client_impl_;
@@ -282,7 +276,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
scoped_ptr<WebCore::Page> page_;
// This flag is set when a new navigation is detected. It is used to satisfy
- // the corresponding argument to WebViewDelegate::DidCommitLoadForFrame.
+ // the corresponding argument to WebFrameClient::didCommitProvisionalLoad.
bool observed_new_navigation_;
#ifndef NDEBUG
// Used to assert that the new navigation we observed is the same navigation
diff --git a/webkit/glue/webview_unittest.cc b/webkit/glue/webview_unittest.cc
index 36f87c8..4c524f8 100644
--- a/webkit/glue/webview_unittest.cc
+++ b/webkit/glue/webview_unittest.cc
@@ -3,9 +3,11 @@
// found in the LICENSE file.
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/webview.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/tools/test_shell/test_shell_test.h"
+using WebKit::WebView;
+
class WebViewTest : public TestShellTest {
};
diff --git a/webkit/glue/webworker_impl.cc b/webkit/glue/webworker_impl.cc
index 18f3870..5eda75a 100644
--- a/webkit/glue/webworker_impl.cc
+++ b/webkit/glue/webworker_impl.cc
@@ -28,6 +28,7 @@
#include "webkit/api/public/WebScreenInfo.h"
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
+#include "webkit/api/public/WebView.h"
#include "webkit/api/public/WebWorkerClient.h"
#include "webkit/api/src/PlatformMessagePortChannel.h"
#include "webkit/api/src/WebDataSourceImpl.h"
@@ -35,8 +36,6 @@
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/glue/webview.h"
-#include "webkit/glue/webview_delegate.h"
#include "webkit/glue/webworker_impl.h"
using WebKit::WebCursorInfo;
@@ -53,6 +52,7 @@ using WebKit::WebString;
using WebKit::WebURL;
using WebKit::WebWorker;
using WebKit::WebWorkerClient;
+using WebKit::WebView;
#if ENABLE(WORKERS)
@@ -143,7 +143,7 @@ void WebWorkerImpl::startWorkerContext(const WebURL& script_url,
// loading requests from the worker context to the rest of WebKit and Chromium
// infrastructure.
DCHECK(!web_view_);
- web_view_ = WebView::Create(NULL);
+ web_view_ = WebView::create(NULL);
WebPreferences().Apply(web_view_);
web_view_->initializeMainFrame(WorkerWebFrameClient::GetSharedInstance());
diff --git a/webkit/glue/webworker_impl.h b/webkit/glue/webworker_impl.h
index 33c7b05..53c745a 100644
--- a/webkit/glue/webworker_impl.h
+++ b/webkit/glue/webworker_impl.h
@@ -17,9 +17,11 @@
namespace WebCore {
class WorkerThread;
-};
+}
+namespace WebKit {
class WebView;
+}
// This class is used by the worker process code to talk to the WebCore::Worker
// implementation. It can't use it directly since it uses WebKit types, so this
@@ -127,7 +129,7 @@ class WebWorkerImpl: public WebCore::WorkerObjectProxy,
// 'shadow page' - created to proxy loading requests from the worker.
WTF::RefPtr<WebCore::ScriptExecutionContext> loading_document_;
- WebView* web_view_;
+ WebKit::WebView* web_view_;
bool asked_to_terminate_;
WTF::RefPtr<WebCore::WorkerThread> worker_thread_;