| OLD | NEW |
| 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" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 bool replace = false) = 0; | 111 bool replace = false) = 0; |
| 112 | 112 |
| 113 // This method is short-hand for calling LoadData, where mime_type is | 113 // This method is short-hand for calling LoadData, where mime_type is |
| 114 // "text/html" and text_encoding is "UTF-8". | 114 // "text/html" and text_encoding is "UTF-8". |
| 115 virtual void LoadHTMLString( | 115 virtual void LoadHTMLString( |
| 116 const WebKit::WebData& html, | 116 const WebKit::WebData& html, |
| 117 const WebKit::WebURL& base_url, | 117 const WebKit::WebURL& base_url, |
| 118 const WebKit::WebURL& unreachable_url = WebKit::WebURL(), | 118 const WebKit::WebURL& unreachable_url = WebKit::WebURL(), |
| 119 bool replace = false) = 0; | 119 bool replace = false) = 0; |
| 120 | 120 |
| 121 // Asks the WebFrame to try and download the alternate error page. We notify | |
| 122 // the WebViewDelegate of the results so it can decide whether or not to show | |
| 123 // something to the user (e.g., a local error page or the alternate error | |
| 124 // page). | |
| 125 virtual void LoadAlternateHTMLErrorPage(const WebKit::WebURLRequest& request, | |
| 126 const WebKit::WebURLError& error, | |
| 127 const GURL& error_page_url, | |
| 128 bool replace, | |
| 129 const GURL& fake_url) = 0; | |
| 130 | |
| 131 // Called to associate the WebURLRequest with this frame. The request will | 121 // Called to associate the WebURLRequest with this frame. The request will |
| 132 // be modified to inherit parameters that allow it to be loaded. This method | 122 // be modified to inherit parameters that allow it to be loaded. This method |
| 133 // ends up triggering WebViewDelegate::WillSendRequest. | 123 // ends up triggering WebViewDelegate::WillSendRequest. |
| 134 virtual void DispatchWillSendRequest(WebKit::WebURLRequest* request) = 0; | 124 virtual void DispatchWillSendRequest(WebKit::WebURLRequest* request) = 0; |
| 135 | 125 |
| 136 // Executes JavaScript in the web frame. | 126 // Executes JavaScript in the web frame. |
| 137 virtual void ExecuteScript(const WebKit::WebScriptSource& source) = 0; | 127 virtual void ExecuteScript(const WebKit::WebScriptSource& source) = 0; |
| 138 | 128 |
| 139 // Executes JavaScript in a new context associated with the web frame. The | 129 // Executes JavaScript in a new context associated with the web frame. The |
| 140 // script gets its own global scope and its own prototypes for intrinsic | 130 // script gets its own global scope and its own prototypes for intrinsic |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // above) and the provisional data source will be NULL. | 196 // above) and the provisional data source will be NULL. |
| 207 virtual WebKit::WebDataSource* GetProvisionalDataSource() const = 0; | 197 virtual WebKit::WebDataSource* GetProvisionalDataSource() const = 0; |
| 208 | 198 |
| 209 // | 199 // |
| 210 // @method stopLoading | 200 // @method stopLoading |
| 211 // @discussion Stop any pending loads on the frame's data source, | 201 // @discussion Stop any pending loads on the frame's data source, |
| 212 // and its children. | 202 // and its children. |
| 213 // - (void)stopLoading; | 203 // - (void)stopLoading; |
| 214 virtual void StopLoading() = 0; | 204 virtual void StopLoading() = 0; |
| 215 | 205 |
| 206 // Returns true if this frame is loading its main resource or a subresource. |
| 207 virtual bool IsLoading() const = 0; |
| 208 |
| 216 // Returns the frame that opened this frame, or NULL if this window has no | 209 // Returns the frame that opened this frame, or NULL if this window has no |
| 217 // opener. | 210 // opener. |
| 218 virtual WebFrame* GetOpener() const = 0; | 211 virtual WebFrame* GetOpener() const = 0; |
| 219 | 212 |
| 220 // Returns the frame containing this frame, or NULL of this is a top level | 213 // Returns the frame containing this frame, or NULL of this is a top level |
| 221 // frame with no parent. | 214 // frame with no parent. |
| 222 virtual WebFrame* GetParent() const = 0; | 215 virtual WebFrame* GetParent() const = 0; |
| 223 | 216 |
| 224 // Returns the top-most frame in the frame hierarchy containing this frame. | 217 // Returns the top-most frame in the frame hierarchy containing this frame. |
| 225 virtual WebFrame* GetTop() const = 0; | 218 virtual WebFrame* GetTop() const = 0; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 virtual int PendingFrameUnloadEventCount() const = 0; | 417 virtual int PendingFrameUnloadEventCount() const = 0; |
| 425 | 418 |
| 426 protected: | 419 protected: |
| 427 virtual ~WebFrame() {} | 420 virtual ~WebFrame() {} |
| 428 | 421 |
| 429 private: | 422 private: |
| 430 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 423 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
| 431 }; | 424 }; |
| 432 | 425 |
| 433 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 426 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
| OLD | NEW |