| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after 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::string& encoding() const { return encoding_; } | 235 const std::string& encoding() const { return encoding_; } |
| 236 void set_encoding(const std::string& encoding); | 236 void set_encoding(const std::string& encoding); |
| 237 void reset_encoding() { |
| 238 encoding_.clear(); |
| 239 } |
| 237 | 240 |
| 238 // Internal state ------------------------------------------------------------ | 241 // Internal state ------------------------------------------------------------ |
| 239 | 242 |
| 240 // This flag indicates whether the tab contents is currently being | 243 // This flag indicates whether the tab contents is currently being |
| 241 // screenshotted by the DraggedTabController. | 244 // screenshotted by the DraggedTabController. |
| 242 bool capturing_contents() const { return capturing_contents_; } | 245 bool capturing_contents() const { return capturing_contents_; } |
| 243 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } | 246 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } |
| 244 | 247 |
| 245 // Indicates whether this tab should be considered crashed. The setter will | 248 // Indicates whether this tab should be considered crashed. The setter will |
| 246 // also notify the delegate when the flag is changed. | 249 // also notify the delegate when the flag is changed. |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 | 574 |
| 572 // Override the encoding and reload the page by sending down | 575 // Override the encoding and reload the page by sending down |
| 573 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda | 576 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda |
| 574 // the opposite of this, by which 'browser' is notified of | 577 // the opposite of this, by which 'browser' is notified of |
| 575 // the encoding of the current tab from 'renderer' (determined by | 578 // the encoding of the current tab from 'renderer' (determined by |
| 576 // auto-detect, http header, meta, bom detection, etc). | 579 // auto-detect, http header, meta, bom detection, etc). |
| 577 void override_encoding(const std::string& encoding) { | 580 void override_encoding(const std::string& encoding) { |
| 578 set_encoding(encoding); | 581 set_encoding(encoding); |
| 579 render_view_host()->SetPageEncoding(encoding); | 582 render_view_host()->SetPageEncoding(encoding); |
| 580 } | 583 } |
| 584 // Remove any user-defined override encoding and reload by sending down |
| 585 // ViewMsg_ResetPageEncodingToDefault to the renderer. |
| 586 void reset_override_encoding() { |
| 587 reset_encoding(); |
| 588 render_view_host()->ResetPageEncodingToDefault(); |
| 589 } |
| 581 | 590 |
| 582 void WindowMoveOrResizeStarted() { | 591 void WindowMoveOrResizeStarted() { |
| 583 render_view_host()->WindowMoveOrResizeStarted(); | 592 render_view_host()->WindowMoveOrResizeStarted(); |
| 584 } | 593 } |
| 585 | 594 |
| 586 BlockedPopupContainer* blocked_popup_container() const { | 595 BlockedPopupContainer* blocked_popup_container() const { |
| 587 return blocked_popups_; | 596 return blocked_popups_; |
| 588 } | 597 } |
| 589 | 598 |
| 590 RendererPreferences* GetMutableRendererPrefs() { | 599 RendererPreferences* GetMutableRendererPrefs() { |
| (...skipping 529 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 | 1129 // 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. | 1130 // non-NULL and represent the DOMUI of the opening renderer. |
| 1122 DOMUITypeID opener_dom_ui_type_; | 1131 DOMUITypeID opener_dom_ui_type_; |
| 1123 | 1132 |
| 1124 // --------------------------------------------------------------------------- | 1133 // --------------------------------------------------------------------------- |
| 1125 | 1134 |
| 1126 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1135 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1127 }; | 1136 }; |
| 1128 | 1137 |
| 1129 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1138 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |