| Index: chrome/browser/web_contents.h
|
| ===================================================================
|
| --- chrome/browser/web_contents.h (revision 3674)
|
| +++ chrome/browser/web_contents.h (working copy)
|
| @@ -72,6 +72,11 @@
|
|
|
| bool is_starred() const { return is_starred_; }
|
|
|
| + const std::wstring& encoding() const { return encoding_; }
|
| + void set_encoding(const std::wstring& encoding) {
|
| + encoding_ = encoding;
|
| + }
|
| +
|
| // TabContents (public overrides) --------------------------------------------
|
|
|
| virtual void Destroy();
|
| @@ -188,6 +193,16 @@
|
| // Returns true if this WebContents will notify about disconnection.
|
| bool notify_disconnection() const { return notify_disconnection_; }
|
|
|
| + // Override the encoding and reload the page by sending down
|
| + // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda
|
| + // the opposite of this, by which 'browser' is notified of
|
| + // the encoding of the current tab from 'renderer' (determined by
|
| + // auto-detect, http header, meta, bom detection, etc).
|
| + void override_encoding(const std::wstring& encoding) {
|
| + set_encoding(encoding);
|
| + render_view_host()->SetPageEncoding(encoding);
|
| + }
|
| +
|
| protected:
|
| // Should be deleted via CloseContents.
|
| virtual ~WebContents();
|
| @@ -219,7 +234,7 @@
|
| int32 page_id,
|
| const std::wstring& title);
|
| virtual void UpdateEncoding(RenderViewHost* render_view_host,
|
| - const std::wstring& encoding_name);
|
| + const std::wstring& encoding);
|
| virtual void UpdateTargetURL(int32 page_id, const GURL& url);
|
| virtual void UpdateThumbnail(const GURL& url,
|
| const SkBitmap& bitmap,
|
| @@ -362,6 +377,7 @@
|
| GearsCreateShortcutCallbackFunctor* callback_functor;
|
| };
|
|
|
| +
|
| // NotificationObserver ------------------------------------------------------
|
|
|
| virtual void Observe(NotificationType type,
|
| @@ -521,6 +537,9 @@
|
| // used to check whether we can do something for some special contents.
|
| std::string contents_mime_type_;
|
|
|
| + // Character encoding. TODO(jungshik) : convert to std::string
|
| + std::wstring encoding_;
|
| +
|
| PendingInstall pending_install_;
|
|
|
| // The last time that the download shelf was made visible.
|
|
|