| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 // Return whether this tab contents is loading a resource, or whether its | 173 // Return whether this tab contents is loading a resource, or whether its |
| 174 // web_ui is. | 174 // web_ui is. |
| 175 bool IsLoading() const; | 175 bool IsLoading() const; |
| 176 | 176 |
| 177 // Returns whether this tab contents is waiting for a first-response for the | 177 // Returns whether this tab contents is waiting for a first-response for the |
| 178 // main resource of the page. This controls whether the throbber state is | 178 // main resource of the page. This controls whether the throbber state is |
| 179 // "waiting" or "loading." | 179 // "waiting" or "loading." |
| 180 bool waiting_for_response() const { return waiting_for_response_; } | 180 bool waiting_for_response() const { return waiting_for_response_; } |
| 181 | 181 |
| 182 net::LoadState load_state() const { return load_state_; } | 182 const net::LoadStateWithParam& load_state() const { return load_state_; } |
| 183 string16 load_state_host() const { return load_state_host_; } | 183 const string16& load_state_host() const { return load_state_host_; } |
| 184 uint64 upload_size() const { return upload_size_; } | 184 uint64 upload_size() const { return upload_size_; } |
| 185 uint64 upload_position() const { return upload_position_; } | 185 uint64 upload_position() const { return upload_position_; } |
| 186 | 186 |
| 187 const std::string& encoding() const { return encoding_; } | 187 const std::string& encoding() const { return encoding_; } |
| 188 void set_encoding(const std::string& encoding); | 188 void set_encoding(const std::string& encoding); |
| 189 void reset_encoding() { | 189 void reset_encoding() { |
| 190 encoding_.clear(); | 190 encoding_.clear(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool displayed_insecure_content() const { | 193 bool displayed_insecure_content() const { |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 IPC::Message* reply_msg) OVERRIDE; | 680 IPC::Message* reply_msg) OVERRIDE; |
| 681 virtual RendererPreferences GetRendererPrefs( | 681 virtual RendererPreferences GetRendererPrefs( |
| 682 content::BrowserContext* browser_context) const OVERRIDE; | 682 content::BrowserContext* browser_context) const OVERRIDE; |
| 683 virtual WebPreferences GetWebkitPrefs() OVERRIDE; | 683 virtual WebPreferences GetWebkitPrefs() OVERRIDE; |
| 684 virtual void OnUserGesture() OVERRIDE; | 684 virtual void OnUserGesture() OVERRIDE; |
| 685 virtual void OnIgnoredUIEvent() OVERRIDE; | 685 virtual void OnIgnoredUIEvent() OVERRIDE; |
| 686 virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 686 virtual void RendererUnresponsive(RenderViewHost* render_view_host, |
| 687 bool is_during_unload) OVERRIDE; | 687 bool is_during_unload) OVERRIDE; |
| 688 virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; | 688 virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; |
| 689 virtual void LoadStateChanged(const GURL& url, | 689 virtual void LoadStateChanged(const GURL& url, |
| 690 net::LoadState load_state, | 690 const net::LoadStateWithParam& load_state, |
| 691 uint64 upload_position, | 691 uint64 upload_position, |
| 692 uint64 upload_size) OVERRIDE; | 692 uint64 upload_size) OVERRIDE; |
| 693 virtual void WorkerCrashed() OVERRIDE; | 693 virtual void WorkerCrashed() OVERRIDE; |
| 694 virtual void Activate() OVERRIDE; | 694 virtual void Activate() OVERRIDE; |
| 695 virtual void Deactivate() OVERRIDE; | 695 virtual void Deactivate() OVERRIDE; |
| 696 virtual void LostCapture() OVERRIDE; | 696 virtual void LostCapture() OVERRIDE; |
| 697 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 697 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 698 bool* is_keyboard_shortcut) OVERRIDE; | 698 bool* is_keyboard_shortcut) OVERRIDE; |
| 699 virtual void HandleKeyboardEvent( | 699 virtual void HandleKeyboardEvent( |
| 700 const NativeWebKeyboardEvent& event) OVERRIDE; | 700 const NativeWebKeyboardEvent& event) OVERRIDE; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 // Indicates the largest PageID we've seen. This field is ignored if we are | 772 // Indicates the largest PageID we've seen. This field is ignored if we are |
| 773 // a TabContents, in which case the max page ID is stored separately with | 773 // a TabContents, in which case the max page ID is stored separately with |
| 774 // each SiteInstance. | 774 // each SiteInstance. |
| 775 // TODO(brettw) this seems like it can be removed according to the comment. | 775 // TODO(brettw) this seems like it can be removed according to the comment. |
| 776 int32 max_page_id_; | 776 int32 max_page_id_; |
| 777 | 777 |
| 778 // System time at which the current load was started. | 778 // System time at which the current load was started. |
| 779 base::TimeTicks current_load_start_; | 779 base::TimeTicks current_load_start_; |
| 780 | 780 |
| 781 // The current load state and the URL associated with it. | 781 // The current load state and the URL associated with it. |
| 782 net::LoadState load_state_; | 782 net::LoadStateWithParam load_state_; |
| 783 string16 load_state_host_; | 783 string16 load_state_host_; |
| 784 // Upload progress, for displaying in the status bar. | 784 // Upload progress, for displaying in the status bar. |
| 785 // Set to zero when there is no significant upload happening. | 785 // Set to zero when there is no significant upload happening. |
| 786 uint64 upload_size_; | 786 uint64 upload_size_; |
| 787 uint64 upload_position_; | 787 uint64 upload_position_; |
| 788 | 788 |
| 789 // Data for current page ----------------------------------------------------- | 789 // Data for current page ----------------------------------------------------- |
| 790 | 790 |
| 791 // When a title cannot be taken from any entry, this title will be used. | 791 // When a title cannot be taken from any entry, this title will be used. |
| 792 string16 page_title_when_no_navigation_entry_; | 792 string16 page_title_when_no_navigation_entry_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 ObserverList<TabContentsObserver> observers_; | 858 ObserverList<TabContentsObserver> observers_; |
| 859 | 859 |
| 860 // Content restrictions, used to disable print/copy etc based on content's | 860 // Content restrictions, used to disable print/copy etc based on content's |
| 861 // (full-page plugins for now only) permissions. | 861 // (full-page plugins for now only) permissions. |
| 862 int content_restrictions_; | 862 int content_restrictions_; |
| 863 | 863 |
| 864 DISALLOW_COPY_AND_ASSIGN(TabContents); | 864 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 865 }; | 865 }; |
| 866 | 866 |
| 867 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 867 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |