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

Side by Side Diff: webkit/glue/webframe_impl.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/webframe.h ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class WebPluginDelegate; 45 class WebPluginDelegate;
46 class WebView; 46 class WebView;
47 class WebViewImpl; 47 class WebViewImpl;
48 class WebTextInput; 48 class WebTextInput;
49 class WebTextInputImpl; 49 class WebTextInputImpl;
50 50
51 namespace WebCore { 51 namespace WebCore {
52 class Frame; 52 class Frame;
53 class FrameView; 53 class FrameView;
54 class HistoryItem; 54 class HistoryItem;
55 class KURL;
55 class Node; 56 class Node;
56 class Range; 57 class Range;
57 class SubstituteData; 58 class SubstituteData;
58 struct WindowFeatures; 59 struct WindowFeatures;
59 } 60 }
60 61
61 namespace gfx { 62 namespace gfx {
62 class BitmapPlatformDevice; 63 class BitmapPlatformDevice;
63 } 64 }
64 65
65 // Implementation of WebFrame, note that this is a reference counted object. 66 // Implementation of WebFrame, note that this is a reference counted object.
66 class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { 67 class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
67 public: 68 public:
68 WebFrameImpl(); 69 WebFrameImpl();
69 ~WebFrameImpl(); 70 ~WebFrameImpl();
70 71
71 static int live_object_count() { 72 static int live_object_count() {
72 return live_object_count_; 73 return live_object_count_;
73 } 74 }
74 75
75 // Called by the WebViewImpl to initialize its main frame: 76 // Called by the WebViewImpl to initialize its main frame:
76 void InitMainFrame(WebViewImpl* webview_impl); 77 void InitMainFrame(WebViewImpl* webview_impl);
77 78
78 // WebFrame 79 // WebFrame
80 virtual void Reload();
79 virtual void LoadRequest(const WebKit::WebURLRequest& request); 81 virtual void LoadRequest(const WebKit::WebURLRequest& request);
80 virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item); 82 virtual void LoadHistoryItem(const WebKit::WebHistoryItem& item);
81 virtual void LoadHTMLString(const std::string& html_text, 83 virtual void LoadData(
82 const GURL& base_url); 84 const WebKit::WebData& data,
83 virtual void LoadAlternateHTMLString(const WebKit::WebURLRequest& request, 85 const WebKit::WebString& mime_type,
84 const std::string& html_text, 86 const WebKit::WebString& text_encoding,
85 const GURL& display_url, 87 const WebKit::WebURL& base_url,
86 bool replace); 88 const WebKit::WebURL& unreachable_url = WebKit::WebURL(),
87 virtual void LoadAlternateHTMLErrorPage(const WebKit::WebURLRequest& request, 89 bool replace = false);
88 const WebKit::WebURLError& error, 90 virtual void LoadHTMLString(
89 const GURL& error_page_url, 91 const WebKit::WebData& data,
90 bool replace, 92 const WebKit::WebURL& base_url,
91 const GURL& fake_url); 93 const WebKit::WebURL& unreachable_url = WebKit::WebURL(),
94 bool replace = false);
95 virtual void LoadAlternateHTMLErrorPage(
96 const WebKit::WebURLRequest& request,
97 const WebKit::WebURLError& error,
98 const GURL& error_page_url,
99 bool replace,
100 const GURL& fake_url);
92 virtual void ExecuteScript(const WebKit::WebScriptSource& source); 101 virtual void ExecuteScript(const WebKit::WebScriptSource& source);
93 virtual void ExecuteScriptInNewContext( 102 virtual void ExecuteScriptInNewContext(
94 const WebKit::WebScriptSource* sources, int num_sources); 103 const WebKit::WebScriptSource* sources, int num_sources);
95 virtual bool InsertCSSStyles(const std::string& css); 104 virtual bool InsertCSSStyles(const std::string& css);
96 virtual WebKit::WebHistoryItem GetPreviousHistoryItem() const; 105 virtual WebKit::WebHistoryItem GetPreviousHistoryItem() const;
97 virtual WebKit::WebHistoryItem GetCurrentHistoryItem() const; 106 virtual WebKit::WebHistoryItem GetCurrentHistoryItem() const;
98 virtual GURL GetURL() const; 107 virtual GURL GetURL() const;
99 virtual GURL GetFavIconURL() const; 108 virtual GURL GetFavIconURL() const;
100 virtual GURL GetOSDDURL() const; 109 virtual GURL GetOSDDURL() const;
101 virtual int GetContentsPreferredWidth() const; 110 virtual int GetContentsPreferredWidth() const;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 webkit_glue::PasswordAutocompleteListener* GetPasswordListener( 266 webkit_glue::PasswordAutocompleteListener* GetPasswordListener(
258 WebCore::HTMLInputElement* user_name_input_element); 267 WebCore::HTMLInputElement* user_name_input_element);
259 268
260 protected: 269 protected:
261 friend class WebFrameLoaderClient; 270 friend class WebFrameLoaderClient;
262 271
263 // Informs the WebFrame that the Frame is being closed, called by the 272 // Informs the WebFrame that the Frame is being closed, called by the
264 // WebFrameLoaderClient 273 // WebFrameLoaderClient
265 void Closing(); 274 void Closing();
266 275
276 #if 0
267 // A helper function for loading some document, given all of its data, into 277 // A helper function for loading some document, given all of its data, into
268 // this frame. The charset may be empty if unknown, but a mime type must be 278 // this frame. The charset may be empty if unknown, but a mime type must be
269 // specified. TODO(darin): Add option for storing this in session history. 279 // specified. TODO(darin): Add option for storing this in session history.
270 void LoadDocumentData(const WebCore::KURL& base_url, 280 void LoadDocumentData(const WebCore::KURL& base_url,
271 const WebCore::String& data, 281 const WebCore::String& data,
272 const WebCore::String& mime_type, 282 const WebCore::String& mime_type,
273 const WebCore::String& charset); 283 const WebCore::String& charset);
284 #endif
274 285
275 // See WebFrame.h for details. 286 // See WebFrame.h for details.
276 virtual void IncreaseMatchCount(int count, int request_id); 287 virtual void IncreaseMatchCount(int count, int request_id);
277 virtual void ReportFindInPageSelection(const WebKit::WebRect& selection_rect, 288 virtual void ReportFindInPageSelection(const WebKit::WebRect& selection_rect,
278 int active_match_ordinal, 289 int active_match_ordinal,
279 int request_id); 290 int request_id);
280 291
281 // Resource fetcher for downloading an alternate DNS error page. 292 // Resource fetcher for downloading an alternate DNS error page.
282 scoped_ptr<AltErrorPageResourceFetcher> alt_error_page_fetcher_; 293 scoped_ptr<AltErrorPageResourceFetcher> alt_error_page_fetcher_;
283 294
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // is a repeat search that already returned nothing last time the same prefix 390 // is a repeat search that already returned nothing last time the same prefix
380 // was searched. 391 // was searched.
381 bool ShouldScopeMatches(const string16& search_text); 392 bool ShouldScopeMatches(const string16& search_text);
382 393
383 // Only for test_shell 394 // Only for test_shell
384 int PendingFrameUnloadEventCount() const; 395 int PendingFrameUnloadEventCount() const;
385 396
386 // Determines whether to invalidate the content area and scrollbar. 397 // Determines whether to invalidate the content area and scrollbar.
387 void InvalidateIfNecessary(); 398 void InvalidateIfNecessary();
388 399
389 void InternalLoadRequest(const WebKit::WebURLRequest& request,
390 const WebCore::SubstituteData& data,
391 bool replace);
392
393 // Clears the map of password listeners. 400 // Clears the map of password listeners.
394 void ClearPasswordListeners(); 401 void ClearPasswordListeners();
395 402
403 void LoadJavaScriptURL(const WebCore::KURL& url);
404
396 // Valid between calls to BeginPrint() and EndPrint(). Containts the print 405 // Valid between calls to BeginPrint() and EndPrint(). Containts the print
397 // information. Is used by PrintPage(). 406 // information. Is used by PrintPage().
398 scoped_ptr<ChromePrintContext> print_context_; 407 scoped_ptr<ChromePrintContext> print_context_;
399 408
400 // The input fields that are interested in edit events and their associated 409 // The input fields that are interested in edit events and their associated
401 // listeners. 410 // listeners.
402 typedef HashMap<RefPtr<WebCore::HTMLInputElement>, 411 typedef HashMap<RefPtr<WebCore::HTMLInputElement>,
403 webkit_glue::PasswordAutocompleteListener*> PasswordListenerMap; 412 webkit_glue::PasswordAutocompleteListener*> PasswordListenerMap;
404 PasswordListenerMap password_listeners_; 413 PasswordListenerMap password_listeners_;
405 414
406 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); 415 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl);
407 }; 416 };
408 417
409 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_ 418 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webframe.h ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698