summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 17:12:55 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 17:12:55 +0000
commite6f546c3ab626d39d375376890b7f4bfef92f48e (patch)
treecbf7b1218db462116ea45f8536ee0900cb1f9ea6 /webkit/glue/webframe_impl.h
parent0e2dc851dc1ba72d849d22eba47ea053b2721916 (diff)
downloadchromium_src-e6f546c3ab626d39d375376890b7f4bfef92f48e.zip
chromium_src-e6f546c3ab626d39d375376890b7f4bfef92f48e.tar.gz
chromium_src-e6f546c3ab626d39d375376890b7f4bfef92f48e.tar.bz2
Add Reload and LoadData methods to WebFrame. LoadData replaces
LoadAlternateHTMLString, changing types to WebKit API types and allowing for more flexibility (supports loading non-HTML data). LoadHTMLString is modified to support some optional parameters. Note: Since WebFrame is going to soon be part of the WebKit API, it is OK style-wise for it to use optional parameters. This patch also includes a change to remove the securityInfo property from WebURLRequest. I did this so that I could eliminate the need to pass a WebURLRequest to LoadData / LoadHTMLString. This also fixes a TODO of mine to eliminate this field on WebCore::ResourceRequest since securityInfo (SSL cert info) is really more of a response property. It was only part of the request as a hack to support certain error pages. I work around that by leveraging NavigationState in chrome/renderer. I added some templatized, implicit constructors to WebData for convenience. I plan to make similar changes to WebCString and WebString in a future CL. This CL is a incremental step toward moving ResourceFetcher out of WebFrame. BUG=15648 TEST=none R=dglazkov Review URL: http://codereview.chromium.org/150146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.h')
-rw-r--r--webkit/glue/webframe_impl.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index 8baab14..4919a0b 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -52,6 +52,7 @@ namespace WebCore {
class Frame;
class FrameView;
class HistoryItem;
+class KURL;
class Node;
class Range;
class SubstituteData;
@@ -76,19 +77,27 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
void InitMainFrame(WebViewImpl* webview_impl);
// WebFrame
+ virtual void Reload();
virtual void LoadRequest(const WebKit::WebURLRequest& request);
virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item);
- virtual void LoadHTMLString(const std::string& html_text,
- const GURL& base_url);
- virtual void LoadAlternateHTMLString(const WebKit::WebURLRequest& request,
- const std::string& html_text,
- const GURL& display_url,
- bool replace);
- virtual void LoadAlternateHTMLErrorPage(const WebKit::WebURLRequest& request,
- const WebKit::WebURLError& error,
- const GURL& error_page_url,
- bool replace,
- const GURL& fake_url);
+ virtual void LoadData(
+ const WebKit::WebData& data,
+ const WebKit::WebString& mime_type,
+ const WebKit::WebString& text_encoding,
+ const WebKit::WebURL& base_url,
+ const WebKit::WebURL& unreachable_url = WebKit::WebURL(),
+ bool replace = false);
+ virtual void LoadHTMLString(
+ const WebKit::WebData& data,
+ const WebKit::WebURL& base_url,
+ const WebKit::WebURL& unreachable_url = WebKit::WebURL(),
+ bool replace = false);
+ virtual void LoadAlternateHTMLErrorPage(
+ const WebKit::WebURLRequest& request,
+ const WebKit::WebURLError& error,
+ const GURL& error_page_url,
+ bool replace,
+ const GURL& fake_url);
virtual void ExecuteScript(const WebKit::WebScriptSource& source);
virtual void ExecuteScriptInNewContext(
const WebKit::WebScriptSource* sources, int num_sources);
@@ -264,14 +273,6 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
// WebFrameLoaderClient
void Closing();
- // A helper function for loading some document, given all of its data, into
- // this frame. The charset may be empty if unknown, but a mime type must be
- // specified. TODO(darin): Add option for storing this in session history.
- void LoadDocumentData(const WebCore::KURL& base_url,
- const WebCore::String& data,
- const WebCore::String& mime_type,
- const WebCore::String& charset);
-
// See WebFrame.h for details.
virtual void IncreaseMatchCount(int count, int request_id);
virtual void ReportFindInPageSelection(const WebKit::WebRect& selection_rect,
@@ -386,13 +387,11 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
// Determines whether to invalidate the content area and scrollbar.
void InvalidateIfNecessary();
- void InternalLoadRequest(const WebKit::WebURLRequest& request,
- const WebCore::SubstituteData& data,
- bool replace);
-
// Clears the map of password listeners.
void ClearPasswordListeners();
+ void LoadJavaScriptURL(const WebCore::KURL& url);
+
// Valid between calls to BeginPrint() and EndPrint(). Containts the print
// information. Is used by PrintPage().
scoped_ptr<ChromePrintContext> print_context_;