Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: webkit/glue/webframe.h

Issue 150146: Add Reload and LoadData methods to WebFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/glue_util.cc ('k') | webkit/glue/webframe_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_WEBFRAME_H_ 5 #ifndef WEBKIT_GLUE_WEBFRAME_H_
6 #define WEBKIT_GLUE_WEBFRAME_H_ 6 #define WEBKIT_GLUE_WEBFRAME_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "skia/ext/bitmap_platform_device.h" 12 #include "skia/ext/bitmap_platform_device.h"
13 #include "skia/ext/platform_canvas.h" 13 #include "skia/ext/platform_canvas.h"
14 #include "webkit/api/public/WebCanvas.h" 14 #include "webkit/api/public/WebCanvas.h"
15 #include "webkit/api/public/WebURL.h"
15 16
16 class GURL; 17 class GURL;
17 class WebView; 18 class WebView;
18 class WebTextInput; 19 class WebTextInput;
19 struct NPObject; 20 struct NPObject;
20 21
21 namespace WebKit { 22 namespace WebKit {
23 class WebData;
22 class WebDataSource; 24 class WebDataSource;
23 class WebForm; 25 class WebForm;
24 class WebHistoryItem; 26 class WebHistoryItem;
27 class WebString;
25 class WebURLRequest; 28 class WebURLRequest;
26 struct WebConsoleMessage; 29 struct WebConsoleMessage;
27 struct WebFindOptions; 30 struct WebFindOptions;
28 struct WebRect; 31 struct WebRect;
29 struct WebScriptSource; 32 struct WebScriptSource;
30 struct WebSize; 33 struct WebSize;
31 struct WebURLError; 34 struct WebURLError;
32 } 35 }
33 36
34 #if WEBKIT_USING_V8 37 #if WEBKIT_USING_V8
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void GrantUniversalAccess() = 0; 79 virtual void GrantUniversalAccess() = 0;
77 80
78 virtual NPObject* GetWindowNPObject() = 0; 81 virtual NPObject* GetWindowNPObject() = 0;
79 82
80 #if WEBKIT_USING_V8 83 #if WEBKIT_USING_V8
81 // Returns the V8 context for this frame, or an empty handle if there is 84 // Returns the V8 context for this frame, or an empty handle if there is
82 // none. 85 // none.
83 virtual v8::Local<v8::Context> GetScriptContext() = 0; 86 virtual v8::Local<v8::Context> GetScriptContext() = 0;
84 #endif 87 #endif
85 88
89 // Reload the current document.
90 virtual void Reload() = 0;
91
86 // Loads the given WebURLRequest. 92 // Loads the given WebURLRequest.
87 virtual void LoadRequest(const WebKit::WebURLRequest& request) = 0; 93 virtual void LoadRequest(const WebKit::WebURLRequest& request) = 0;
88 94
89 // Loads the given WebHistoryItem. This corresponds to a back/forward 95 // Loads the given WebHistoryItem. This corresponds to a back/forward
90 // navigation. 96 // navigation.
91 virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item) = 0; 97 virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item) = 0;
92 98
93 // This method is short-hand for calling LoadAlternateHTMLString with a dummy 99 // Loads the given data with specific mime type and optional text encoding.
94 // request for the given base_url. 100 // For HTML data, base_url indicates the security origin of the document and
95 virtual void LoadHTMLString(const std::string& html_text, 101 // is used to resolve links. If specified, unreachable_url is reported via
96 const GURL& base_url) = 0; 102 // WebDataSource::unreachableURL. If replace is false, then this data will
103 // be loaded as a normal navigation. Otherwise, the current history item
104 // will be replaced.
105 virtual void LoadData(
106 const WebKit::WebData& data,
107 const WebKit::WebString& mime_type,
108 const WebKit::WebString& text_encoding,
109 const WebKit::WebURL& base_url,
110 const WebKit::WebURL& unreachable_url = WebKit::WebURL(),
111 bool replace = false) = 0;
97 112
98 // Loads alternative HTML text in place of a particular URL. This method is 113 // This method is short-hand for calling LoadData, where mime_type is
99 // designed with error pages in mind, in which case it would typically be 114 // "text/html" and text_encoding is "UTF-8".
100 // called in response to WebViewDelegate's didFailProvisionalLoadWithError 115 virtual void LoadHTMLString(
101 // method. 116 const WebKit::WebData& html,
102 // 117 const WebKit::WebURL& base_url,
103 // |html_text| is a utf8 string to load in the frame. |display_url| is the 118 const WebKit::WebURL& unreachable_url = WebKit::WebURL(),
104 // URL that the content will appear to have been loaded from. The |replace| 119 bool replace = false) = 0;
105 // parameter controls how this affects session history. If |replace| is
106 // true, then the current session history entry is replaced with the given
107 // HTML text. Otherwise, a new navigation is produced.
108 //
109 // In either case, when the corresponding session history entry is revisited,
110 // it is the given request /w the |display_url| substituted for the request's
111 // URL, which is repeated. The |html_text| is not stored in session history.
112 //
113 virtual void LoadAlternateHTMLString(const WebKit::WebURLRequest& request,
114 const std::string& html_text,
115 const GURL& display_url,
116 bool replace) = 0;
117 120
118 // Asks the WebFrame to try and download the alternate error page. We notify 121 // Asks the WebFrame to try and download the alternate error page. We notify
119 // the WebViewDelegate of the results so it can decide whether or not to show 122 // the WebViewDelegate of the results so it can decide whether or not to show
120 // something to the user (e.g., a local error page or the alternate error 123 // something to the user (e.g., a local error page or the alternate error
121 // page). 124 // page).
122 virtual void LoadAlternateHTMLErrorPage(const WebKit::WebURLRequest& request, 125 virtual void LoadAlternateHTMLErrorPage(const WebKit::WebURLRequest& request,
123 const WebKit::WebURLError& error, 126 const WebKit::WebURLError& error,
124 const GURL& error_page_url, 127 const GURL& error_page_url,
125 bool replace, 128 bool replace,
126 const GURL& fake_url) = 0; 129 const GURL& fake_url) = 0;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 virtual int PendingFrameUnloadEventCount() const = 0; 404 virtual int PendingFrameUnloadEventCount() const = 0;
402 405
403 protected: 406 protected:
404 virtual ~WebFrame() {} 407 virtual ~WebFrame() {}
405 408
406 private: 409 private:
407 DISALLOW_COPY_AND_ASSIGN(WebFrame); 410 DISALLOW_COPY_AND_ASSIGN(WebFrame);
408 }; 411 };
409 412
410 #endif // WEBKIT_GLUE_WEBFRAME_H_ 413 #endif // WEBKIT_GLUE_WEBFRAME_H_
OLDNEW
« no previous file with comments | « webkit/glue/glue_util.cc ('k') | webkit/glue/webframe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698