| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 
| 7 | 7 | 
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" | 
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" | 
| 10 #include "chrome/browser/cancelable_request.h" | 10 #include "chrome/browser/cancelable_request.h" | 
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 207 | 207 | 
| 208   const std::string& contents_mime_type() const { | 208   const std::string& contents_mime_type() const { | 
| 209     return contents_mime_type_; | 209     return contents_mime_type_; | 
| 210   } | 210   } | 
| 211 | 211 | 
| 212   // Returns true if this WebContents will notify about disconnection. | 212   // Returns true if this WebContents will notify about disconnection. | 
| 213   bool notify_disconnection() const { return notify_disconnection_; } | 213   bool notify_disconnection() const { return notify_disconnection_; } | 
| 214 | 214 | 
| 215   // Override the encoding and reload the page by sending down | 215   // Override the encoding and reload the page by sending down | 
| 216   // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda | 216   // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda | 
| 217   // the opposite of this, by which 'browser' is notified of | 217   // the opposite of this, by which 'browser' is notified of | 
| 218   // the encoding of the current tab from 'renderer' (determined by | 218   // the encoding of the current tab from 'renderer' (determined by | 
| 219   // auto-detect, http header, meta, bom detection, etc). | 219   // auto-detect, http header, meta, bom detection, etc). | 
| 220   void override_encoding(const std::wstring& encoding) { | 220   void override_encoding(const std::wstring& encoding) { | 
| 221     set_encoding(encoding); | 221     set_encoding(encoding); | 
| 222     render_view_host()->SetPageEncoding(encoding); | 222     render_view_host()->SetPageEncoding(encoding); | 
| 223   } | 223   } | 
| 224 | 224 | 
| 225   void CrossSiteNavigationCanceled() { | 225   void CrossSiteNavigationCanceled() { | 
| 226     render_manager_.CrossSiteNavigationCanceled(); | 226     render_manager_.CrossSiteNavigationCanceled(); | 
| 227   } | 227   } | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 301                                     const int flags, | 301                                     const int flags, | 
| 302                                     IPC::Message* reply_msg, | 302                                     IPC::Message* reply_msg, | 
| 303                                     bool* did_suppress_message); | 303                                     bool* did_suppress_message); | 
| 304   virtual void RunBeforeUnloadConfirm(const std::wstring& message, | 304   virtual void RunBeforeUnloadConfirm(const std::wstring& message, | 
| 305                                       IPC::Message* reply_msg); | 305                                       IPC::Message* reply_msg); | 
| 306   virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | 306   virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | 
| 307                                    const std::string& json_arguments, | 307                                    const std::string& json_arguments, | 
| 308                                    IPC::Message* reply_msg); | 308                                    IPC::Message* reply_msg); | 
| 309   virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms); | 309   virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms); | 
| 310   virtual void AutofillFormSubmitted(const AutofillForm& form); | 310   virtual void AutofillFormSubmitted(const AutofillForm& form); | 
| 311   virtual void GetAutofillSuggestions(const std::wstring& field_name, | 311   virtual void GetAutofillSuggestions(const std::wstring& field_name, | 
| 312       const std::wstring& user_text, int64 node_id, int request_id); | 312       const std::wstring& user_text, int64 node_id, int request_id); | 
| 313   virtual void PageHasOSDD(RenderViewHost* render_view_host, | 313   virtual void PageHasOSDD(RenderViewHost* render_view_host, | 
| 314                            int32 page_id, const GURL& url, bool autodetected); | 314                            int32 page_id, const GURL& url, bool autodetected); | 
| 315   virtual void InspectElementReply(int num_resources); | 315   virtual void InspectElementReply(int num_resources); | 
| 316   virtual void DidGetPrintedPagesCount(int cookie, int number_pages); | 316   virtual void DidGetPrintedPagesCount(int cookie, int number_pages); | 
| 317   virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params); | 317   virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params); | 
| 318   virtual GURL GetAlternateErrorPageURL() const; | 318   virtual GURL GetAlternateErrorPageURL() const; | 
| 319   virtual WebPreferences GetWebkitPrefs(); | 319   virtual WebPreferences GetWebkitPrefs(); | 
| 320   virtual void OnMissingPluginStatus(int status); | 320   virtual void OnMissingPluginStatus(int status); | 
| 321   virtual void OnCrashedPlugin(const FilePath& plugin_path); | 321   virtual void OnCrashedPlugin(const FilePath& plugin_path); | 
| 322   virtual void OnJSOutOfMemory(); | 322   virtual void OnJSOutOfMemory(); | 
| 323   virtual void ShouldClosePage(bool proceed) { | 323   virtual void ShouldClosePage(bool proceed) { | 
| 324     render_manager_.ShouldClosePage(proceed); | 324     render_manager_.ShouldClosePage(proceed); | 
| 325   } | 325   } | 
| 326   // Allows the WebContents to react when a cross-site response is ready to be | 326   // Allows the WebContents to react when a cross-site response is ready to be | 
| 327   // delivered to a pending RenderViewHost.  We must first run the onunload | 327   // delivered to a pending RenderViewHost.  We must first run the onunload | 
| 328   // handler of the old RenderViewHost before we can allow it to proceed. | 328   // handler of the old RenderViewHost before we can allow it to proceed. | 
| 329   void OnCrossSiteResponse(int new_render_process_host_id, | 329   void OnCrossSiteResponse(int new_render_process_host_id, | 
| 330                            int new_request_id) { | 330                            int new_request_id) { | 
| 331     render_manager_.OnCrossSiteResponse(new_render_process_host_id, | 331     render_manager_.OnCrossSiteResponse(new_render_process_host_id, | 
| 332                                         new_request_id); | 332                                         new_request_id); | 
| 333   } | 333   } | 
| 334   virtual bool CanBlur() const; | 334   virtual bool CanBlur() const; | 
| 335   virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 335   virtual gfx::Rect GetRootWindowResizerRect() const; | 
|  | 336   virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 
| 336                                     bool is_during_unload); | 337                                     bool is_during_unload); | 
| 337   virtual void RendererResponsive(RenderViewHost* render_view_host); | 338   virtual void RendererResponsive(RenderViewHost* render_view_host); | 
| 338   virtual void LoadStateChanged(const GURL& url, net::LoadState load_state); | 339   virtual void LoadStateChanged(const GURL& url, net::LoadState load_state); | 
| 339   virtual void OnDidGetApplicationInfo( | 340   virtual void OnDidGetApplicationInfo( | 
| 340       int32 page_id, | 341       int32 page_id, | 
| 341       const webkit_glue::WebApplicationInfo& info); | 342       const webkit_glue::WebApplicationInfo& info); | 
| 342   virtual void OnEnterOrSpace(); | 343   virtual void OnEnterOrSpace(); | 
| 343   virtual bool CanTerminate() const; | 344   virtual bool CanTerminate() const; | 
| 344 | 345 | 
| 345 | 346 | 
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 574   base::TimeTicks last_download_shelf_show_; | 575   base::TimeTicks last_download_shelf_show_; | 
| 575 | 576 | 
| 576   // The current load state and the URL associated with it. | 577   // The current load state and the URL associated with it. | 
| 577   net::LoadState load_state_; | 578   net::LoadState load_state_; | 
| 578   std::wstring load_state_host_; | 579   std::wstring load_state_host_; | 
| 579 | 580 | 
| 580   DISALLOW_COPY_AND_ASSIGN(WebContents); | 581   DISALLOW_COPY_AND_ASSIGN(WebContents); | 
| 581 }; | 582 }; | 
| 582 | 583 | 
| 583 #endif  // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 584 #endif  // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 
| OLD | NEW | 
|---|