| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // Return whether this tab contents is loading a resource. | 225 // Return whether this tab contents is loading a resource. |
| 226 bool is_loading() const { return is_loading_; } | 226 bool is_loading() const { return is_loading_; } |
| 227 | 227 |
| 228 // Returns whether this tab contents is waiting for a first-response for the | 228 // Returns whether this tab contents is waiting for a first-response for the |
| 229 // main resource of the page. This controls whether the throbber state is | 229 // main resource of the page. This controls whether the throbber state is |
| 230 // "waiting" or "loading." | 230 // "waiting" or "loading." |
| 231 bool waiting_for_response() const { return waiting_for_response_; } | 231 bool waiting_for_response() const { return waiting_for_response_; } |
| 232 | 232 |
| 233 bool is_starred() const { return is_starred_; } | 233 bool is_starred() const { return is_starred_; } |
| 234 | 234 |
| 235 const std::wstring& encoding() const { return encoding_; } | 235 const std::string& encoding() const { return encoding_; } |
| 236 void set_encoding(const std::wstring& encoding); | 236 void set_encoding(const std::string& encoding); |
| 237 | 237 |
| 238 // Internal state ------------------------------------------------------------ | 238 // Internal state ------------------------------------------------------------ |
| 239 | 239 |
| 240 // This flag indicates whether the tab contents is currently being | 240 // This flag indicates whether the tab contents is currently being |
| 241 // screenshotted by the DraggedTabController. | 241 // screenshotted by the DraggedTabController. |
| 242 bool capturing_contents() const { return capturing_contents_; } | 242 bool capturing_contents() const { return capturing_contents_; } |
| 243 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } | 243 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } |
| 244 | 244 |
| 245 // Indicates whether this tab should be considered crashed. The setter will | 245 // Indicates whether this tab should be considered crashed. The setter will |
| 246 // also notify the delegate when the flag is changed. | 246 // also notify the delegate when the flag is changed. |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } | 567 } |
| 568 | 568 |
| 569 // Returns true if this TabContents will notify about disconnection. | 569 // Returns true if this TabContents will notify about disconnection. |
| 570 bool notify_disconnection() const { return notify_disconnection_; } | 570 bool notify_disconnection() const { return notify_disconnection_; } |
| 571 | 571 |
| 572 // Override the encoding and reload the page by sending down | 572 // Override the encoding and reload the page by sending down |
| 573 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda | 573 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda |
| 574 // the opposite of this, by which 'browser' is notified of | 574 // the opposite of this, by which 'browser' is notified of |
| 575 // the encoding of the current tab from 'renderer' (determined by | 575 // the encoding of the current tab from 'renderer' (determined by |
| 576 // auto-detect, http header, meta, bom detection, etc). | 576 // auto-detect, http header, meta, bom detection, etc). |
| 577 void override_encoding(const std::wstring& encoding) { | 577 void override_encoding(const std::string& encoding) { |
| 578 set_encoding(encoding); | 578 set_encoding(encoding); |
| 579 render_view_host()->SetPageEncoding(encoding); | 579 render_view_host()->SetPageEncoding(encoding); |
| 580 } | 580 } |
| 581 | 581 |
| 582 void WindowMoveOrResizeStarted() { | 582 void WindowMoveOrResizeStarted() { |
| 583 render_view_host()->WindowMoveOrResizeStarted(); | 583 render_view_host()->WindowMoveOrResizeStarted(); |
| 584 } | 584 } |
| 585 | 585 |
| 586 BlockedPopupContainer* blocked_popup_container() const { | 586 BlockedPopupContainer* blocked_popup_container() const { |
| 587 return blocked_popups_; | 587 return blocked_popups_; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 virtual void RenderViewDeleted(RenderViewHost* render_view_host); | 821 virtual void RenderViewDeleted(RenderViewHost* render_view_host); |
| 822 virtual void DidNavigate(RenderViewHost* render_view_host, | 822 virtual void DidNavigate(RenderViewHost* render_view_host, |
| 823 const ViewHostMsg_FrameNavigate_Params& params); | 823 const ViewHostMsg_FrameNavigate_Params& params); |
| 824 virtual void UpdateState(RenderViewHost* render_view_host, | 824 virtual void UpdateState(RenderViewHost* render_view_host, |
| 825 int32 page_id, | 825 int32 page_id, |
| 826 const std::string& state); | 826 const std::string& state); |
| 827 virtual void UpdateTitle(RenderViewHost* render_view_host, | 827 virtual void UpdateTitle(RenderViewHost* render_view_host, |
| 828 int32 page_id, | 828 int32 page_id, |
| 829 const std::wstring& title); | 829 const std::wstring& title); |
| 830 virtual void UpdateEncoding(RenderViewHost* render_view_host, | 830 virtual void UpdateEncoding(RenderViewHost* render_view_host, |
| 831 const std::wstring& encoding); | 831 const std::string& encoding); |
| 832 virtual void UpdateTargetURL(int32 page_id, const GURL& url); | 832 virtual void UpdateTargetURL(int32 page_id, const GURL& url); |
| 833 virtual void UpdateThumbnail(const GURL& url, | 833 virtual void UpdateThumbnail(const GURL& url, |
| 834 const SkBitmap& bitmap, | 834 const SkBitmap& bitmap, |
| 835 const ThumbnailScore& score); | 835 const ThumbnailScore& score); |
| 836 virtual void UpdateInspectorSettings(const std::wstring& raw_settings); | 836 virtual void UpdateInspectorSettings(const std::wstring& raw_settings); |
| 837 virtual void Close(RenderViewHost* render_view_host); | 837 virtual void Close(RenderViewHost* render_view_host); |
| 838 virtual void RequestMove(const gfx::Rect& new_bounds); | 838 virtual void RequestMove(const gfx::Rect& new_bounds); |
| 839 virtual void DidStartLoading(RenderViewHost* render_view_host); | 839 virtual void DidStartLoading(RenderViewHost* render_view_host); |
| 840 virtual void DidStopLoading(RenderViewHost* render_view_host); | 840 virtual void DidStopLoading(RenderViewHost* render_view_host); |
| 841 virtual void RequestOpenURL(const GURL& url, const GURL& referrer, | 841 virtual void RequestOpenURL(const GURL& url, const GURL& referrer, |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 bool received_page_title_; | 1013 bool received_page_title_; |
| 1014 | 1014 |
| 1015 // Whether the current URL is starred | 1015 // Whether the current URL is starred |
| 1016 bool is_starred_; | 1016 bool is_starred_; |
| 1017 | 1017 |
| 1018 // When a navigation occurs, we record its contents MIME type. It can be | 1018 // When a navigation occurs, we record its contents MIME type. It can be |
| 1019 // used to check whether we can do something for some special contents. | 1019 // used to check whether we can do something for some special contents. |
| 1020 std::string contents_mime_type_; | 1020 std::string contents_mime_type_; |
| 1021 | 1021 |
| 1022 // Character encoding. TODO(jungshik) : convert to std::string | 1022 // Character encoding. TODO(jungshik) : convert to std::string |
| 1023 std::wstring encoding_; | 1023 std::string encoding_; |
| 1024 | 1024 |
| 1025 // Data for shelves and stuff ------------------------------------------------ | 1025 // Data for shelves and stuff ------------------------------------------------ |
| 1026 | 1026 |
| 1027 // ConstrainedWindow with additional methods for managing blocked | 1027 // ConstrainedWindow with additional methods for managing blocked |
| 1028 // popups. | 1028 // popups. |
| 1029 BlockedPopupContainer* blocked_popups_; | 1029 BlockedPopupContainer* blocked_popups_; |
| 1030 | 1030 |
| 1031 // Delegates for InfoBars associated with this TabContents. | 1031 // Delegates for InfoBars associated with this TabContents. |
| 1032 std::vector<InfoBarDelegate*> infobar_delegates_; | 1032 std::vector<InfoBarDelegate*> infobar_delegates_; |
| 1033 | 1033 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 // If this tab was created from a renderer using window.open, this will be | 1120 // If this tab was created from a renderer using window.open, this will be |
| 1121 // non-NULL and represent the DOMUI of the opening renderer. | 1121 // non-NULL and represent the DOMUI of the opening renderer. |
| 1122 DOMUITypeID opener_dom_ui_type_; | 1122 DOMUITypeID opener_dom_ui_type_; |
| 1123 | 1123 |
| 1124 // --------------------------------------------------------------------------- | 1124 // --------------------------------------------------------------------------- |
| 1125 | 1125 |
| 1126 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1126 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1127 }; | 1127 }; |
| 1128 | 1128 |
| 1129 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1129 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |