Chromium Code Reviews| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 | 174 |
| 175 // Return whether this tab contents is loading a resource, or whether its | 175 // Return whether this tab contents is loading a resource, or whether its |
| 176 // web_ui is. | 176 // web_ui is. |
| 177 bool IsLoading() const; | 177 bool IsLoading() const; |
| 178 | 178 |
| 179 // Returns whether this tab contents is waiting for a first-response for the | 179 // Returns whether this tab contents is waiting for a first-response for the |
| 180 // main resource of the page. This controls whether the throbber state is | 180 // main resource of the page. This controls whether the throbber state is |
| 181 // "waiting" or "loading." | 181 // "waiting" or "loading." |
| 182 bool waiting_for_response() const { return waiting_for_response_; } | 182 bool waiting_for_response() const { return waiting_for_response_; } |
| 183 | 183 |
| 184 net::LoadState load_state() const { return load_state_; } | 184 const net::LoadStateWithParam& load_state() const { return load_state_; } |
| 185 string16 load_state_host() const { return load_state_host_; } | 185 const string16& load_state_host() const { return load_state_host_; } |
|
eroman
2011/08/05 01:54:22
I wander if this can be worked into LoadStateWithP
Matt Perry
2011/08/08 22:14:33
I think it could, as long as we're OK with a speci
| |
| 186 uint64 upload_size() const { return upload_size_; } | 186 uint64 upload_size() const { return upload_size_; } |
| 187 uint64 upload_position() const { return upload_position_; } | 187 uint64 upload_position() const { return upload_position_; } |
| 188 | 188 |
| 189 const std::string& encoding() const { return encoding_; } | 189 const std::string& encoding() const { return encoding_; } |
| 190 void set_encoding(const std::string& encoding); | 190 void set_encoding(const std::string& encoding); |
| 191 void reset_encoding() { | 191 void reset_encoding() { |
| 192 encoding_.clear(); | 192 encoding_.clear(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool displayed_insecure_content() const { | 195 bool displayed_insecure_content() const { |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 674 IPC::Message* reply_msg) OVERRIDE; | 674 IPC::Message* reply_msg) OVERRIDE; |
| 675 virtual RendererPreferences GetRendererPrefs( | 675 virtual RendererPreferences GetRendererPrefs( |
| 676 content::BrowserContext* browser_context) const OVERRIDE; | 676 content::BrowserContext* browser_context) const OVERRIDE; |
| 677 virtual WebPreferences GetWebkitPrefs() OVERRIDE; | 677 virtual WebPreferences GetWebkitPrefs() OVERRIDE; |
| 678 virtual void OnUserGesture() OVERRIDE; | 678 virtual void OnUserGesture() OVERRIDE; |
| 679 virtual void OnIgnoredUIEvent() OVERRIDE; | 679 virtual void OnIgnoredUIEvent() OVERRIDE; |
| 680 virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 680 virtual void RendererUnresponsive(RenderViewHost* render_view_host, |
| 681 bool is_during_unload) OVERRIDE; | 681 bool is_during_unload) OVERRIDE; |
| 682 virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; | 682 virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; |
| 683 virtual void LoadStateChanged(const GURL& url, | 683 virtual void LoadStateChanged(const GURL& url, |
| 684 net::LoadState load_state, | 684 const net::LoadStateWithParam& load_state, |
| 685 uint64 upload_position, | 685 uint64 upload_position, |
| 686 uint64 upload_size) OVERRIDE; | 686 uint64 upload_size) OVERRIDE; |
| 687 virtual void WorkerCrashed() OVERRIDE; | 687 virtual void WorkerCrashed() OVERRIDE; |
| 688 virtual void Activate() OVERRIDE; | 688 virtual void Activate() OVERRIDE; |
| 689 virtual void Deactivate() OVERRIDE; | 689 virtual void Deactivate() OVERRIDE; |
| 690 virtual void LostCapture() OVERRIDE; | 690 virtual void LostCapture() OVERRIDE; |
| 691 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 691 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 692 bool* is_keyboard_shortcut) OVERRIDE; | 692 bool* is_keyboard_shortcut) OVERRIDE; |
| 693 virtual void HandleKeyboardEvent( | 693 virtual void HandleKeyboardEvent( |
| 694 const NativeWebKeyboardEvent& event) OVERRIDE; | 694 const NativeWebKeyboardEvent& event) OVERRIDE; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 766 // Indicates the largest PageID we've seen. This field is ignored if we are | 766 // Indicates the largest PageID we've seen. This field is ignored if we are |
| 767 // a TabContents, in which case the max page ID is stored separately with | 767 // a TabContents, in which case the max page ID is stored separately with |
| 768 // each SiteInstance. | 768 // each SiteInstance. |
| 769 // TODO(brettw) this seems like it can be removed according to the comment. | 769 // TODO(brettw) this seems like it can be removed according to the comment. |
| 770 int32 max_page_id_; | 770 int32 max_page_id_; |
| 771 | 771 |
| 772 // System time at which the current load was started. | 772 // System time at which the current load was started. |
| 773 base::TimeTicks current_load_start_; | 773 base::TimeTicks current_load_start_; |
| 774 | 774 |
| 775 // The current load state and the URL associated with it. | 775 // The current load state and the URL associated with it. |
| 776 net::LoadState load_state_; | 776 net::LoadStateWithParam load_state_; |
| 777 string16 load_state_host_; | 777 string16 load_state_host_; |
| 778 // Upload progress, for displaying in the status bar. | 778 // Upload progress, for displaying in the status bar. |
| 779 // Set to zero when there is no significant upload happening. | 779 // Set to zero when there is no significant upload happening. |
| 780 uint64 upload_size_; | 780 uint64 upload_size_; |
| 781 uint64 upload_position_; | 781 uint64 upload_position_; |
| 782 | 782 |
| 783 // Data for current page ----------------------------------------------------- | 783 // Data for current page ----------------------------------------------------- |
| 784 | 784 |
| 785 // When a title cannot be taken from any entry, this title will be used. | 785 // When a title cannot be taken from any entry, this title will be used. |
| 786 string16 page_title_when_no_navigation_entry_; | 786 string16 page_title_when_no_navigation_entry_; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 852 ObserverList<TabContentsObserver> observers_; | 852 ObserverList<TabContentsObserver> observers_; |
| 853 | 853 |
| 854 // Content restrictions, used to disable print/copy etc based on content's | 854 // Content restrictions, used to disable print/copy etc based on content's |
| 855 // (full-page plugins for now only) permissions. | 855 // (full-page plugins for now only) permissions. |
| 856 int content_restrictions_; | 856 int content_restrictions_; |
| 857 | 857 |
| 858 DISALLOW_COPY_AND_ASSIGN(TabContents); | 858 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 859 }; | 859 }; |
| 860 | 860 |
| 861 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 861 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |