OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 | 301 |
302 // Internal state ------------------------------------------------------------ | 302 // Internal state ------------------------------------------------------------ |
303 | 303 |
304 // This flag indicates whether the tab contents is currently being | 304 // This flag indicates whether the tab contents is currently being |
305 // screenshotted by the DraggedTabController. | 305 // screenshotted by the DraggedTabController. |
306 bool capturing_contents() const { return capturing_contents_; } | 306 bool capturing_contents() const { return capturing_contents_; } |
307 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } | 307 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } |
308 | 308 |
309 // Indicates whether this tab should be considered crashed. The setter will | 309 // Indicates whether this tab should be considered crashed. The setter will |
310 // also notify the delegate when the flag is changed. | 310 // also notify the delegate when the flag is changed. |
311 bool is_crashed() const { return is_crashed_; } | 311 bool is_crashed() const { |
312 void SetIsCrashed(bool state); | 312 return (crashed_status_ == base::TERMINATION_STATUS_PROCESS_CRASHED || |
313 crashed_status_ == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || | |
314 crashed_status_ == base::TERMINATION_STATUS_PROCESS_WAS_KILLED); | |
Greg Spencer (Chromium)
2010/12/03 01:00:07
Note: We didn't previously consider a renderer "cr
| |
315 } | |
316 base::TerminationStatus crashed_status() const { return crashed_status_; } | |
317 int crashed_error_code() const { return crashed_error_code_; } | |
318 void SetIsCrashed(base::TerminationStatus status, int error_code); | |
313 | 319 |
314 // Call this after updating a page action to notify clients about the changes. | 320 // Call this after updating a page action to notify clients about the changes. |
315 void PageActionStateChanged(); | 321 void PageActionStateChanged(); |
316 | 322 |
317 // Whether the tab is in the process of being destroyed. | 323 // Whether the tab is in the process of being destroyed. |
318 // Added as a tentative work-around for focus related bug #4633. This allows | 324 // Added as a tentative work-around for focus related bug #4633. This allows |
319 // us not to store focus when a tab is being closed. | 325 // us not to store focus when a tab is being closed. |
320 bool is_being_destroyed() const { return is_being_destroyed_; } | 326 bool is_being_destroyed() const { return is_being_destroyed_; } |
321 | 327 |
322 // Convenience method for notifying the delegate of a navigation state | 328 // Convenience method for notifying the delegate of a navigation state |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
928 virtual RenderViewHostDelegate::AutoFill* GetAutoFillDelegate(); | 934 virtual RenderViewHostDelegate::AutoFill* GetAutoFillDelegate(); |
929 virtual RenderViewHostDelegate::SSL* GetSSLDelegate(); | 935 virtual RenderViewHostDelegate::SSL* GetSSLDelegate(); |
930 virtual RenderViewHostDelegate::FileSelect* GetFileSelectDelegate(); | 936 virtual RenderViewHostDelegate::FileSelect* GetFileSelectDelegate(); |
931 virtual AutomationResourceRoutingDelegate* | 937 virtual AutomationResourceRoutingDelegate* |
932 GetAutomationResourceRoutingDelegate(); | 938 GetAutomationResourceRoutingDelegate(); |
933 virtual TabContents* GetAsTabContents(); | 939 virtual TabContents* GetAsTabContents(); |
934 virtual ViewType::Type GetRenderViewType() const; | 940 virtual ViewType::Type GetRenderViewType() const; |
935 virtual int GetBrowserWindowID() const; | 941 virtual int GetBrowserWindowID() const; |
936 virtual void RenderViewCreated(RenderViewHost* render_view_host); | 942 virtual void RenderViewCreated(RenderViewHost* render_view_host); |
937 virtual void RenderViewReady(RenderViewHost* render_view_host); | 943 virtual void RenderViewReady(RenderViewHost* render_view_host); |
938 virtual void RenderViewGone(RenderViewHost* render_view_host); | 944 virtual void RenderViewGone(RenderViewHost* render_view_host, |
945 base::TerminationStatus status, | |
946 int error_code); | |
939 virtual void RenderViewDeleted(RenderViewHost* render_view_host); | 947 virtual void RenderViewDeleted(RenderViewHost* render_view_host); |
940 virtual void DidNavigate(RenderViewHost* render_view_host, | 948 virtual void DidNavigate(RenderViewHost* render_view_host, |
941 const ViewHostMsg_FrameNavigate_Params& params); | 949 const ViewHostMsg_FrameNavigate_Params& params); |
942 virtual void UpdateState(RenderViewHost* render_view_host, | 950 virtual void UpdateState(RenderViewHost* render_view_host, |
943 int32 page_id, | 951 int32 page_id, |
944 const std::string& state); | 952 const std::string& state); |
945 virtual void UpdateTitle(RenderViewHost* render_view_host, | 953 virtual void UpdateTitle(RenderViewHost* render_view_host, |
946 int32 page_id, | 954 int32 page_id, |
947 const std::wstring& title); | 955 const std::wstring& title); |
948 virtual void UpdateEncoding(RenderViewHost* render_view_host, | 956 virtual void UpdateEncoding(RenderViewHost* render_view_host, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1116 | 1124 |
1117 // RenderViewHost::ContentSettingsDelegate. | 1125 // RenderViewHost::ContentSettingsDelegate. |
1118 scoped_ptr<TabSpecificContentSettings> content_settings_delegate_; | 1126 scoped_ptr<TabSpecificContentSettings> content_settings_delegate_; |
1119 | 1127 |
1120 // Data for loading state ---------------------------------------------------- | 1128 // Data for loading state ---------------------------------------------------- |
1121 | 1129 |
1122 // Indicates whether we're currently loading a resource. | 1130 // Indicates whether we're currently loading a resource. |
1123 bool is_loading_; | 1131 bool is_loading_; |
1124 | 1132 |
1125 // Indicates if the tab is considered crashed. | 1133 // Indicates if the tab is considered crashed. |
1126 bool is_crashed_; | 1134 base::TerminationStatus crashed_status_; |
1135 int crashed_error_code_; | |
1127 | 1136 |
1128 // See waiting_for_response() above. | 1137 // See waiting_for_response() above. |
1129 bool waiting_for_response_; | 1138 bool waiting_for_response_; |
1130 | 1139 |
1131 // Indicates the largest PageID we've seen. This field is ignored if we are | 1140 // Indicates the largest PageID we've seen. This field is ignored if we are |
1132 // a TabContents, in which case the max page ID is stored separately with | 1141 // a TabContents, in which case the max page ID is stored separately with |
1133 // each SiteInstance. | 1142 // each SiteInstance. |
1134 // TODO(brettw) this seems like it can be removed according to the comment. | 1143 // TODO(brettw) this seems like it can be removed according to the comment. |
1135 int32 max_page_id_; | 1144 int32 max_page_id_; |
1136 | 1145 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1308 // Content restrictions, used to disable print/copy etc based on content's | 1317 // Content restrictions, used to disable print/copy etc based on content's |
1309 // (full-page plugins for now only) permissions. | 1318 // (full-page plugins for now only) permissions. |
1310 int content_restrictions_; | 1319 int content_restrictions_; |
1311 | 1320 |
1312 // --------------------------------------------------------------------------- | 1321 // --------------------------------------------------------------------------- |
1313 | 1322 |
1314 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1323 DISALLOW_COPY_AND_ASSIGN(TabContents); |
1315 }; | 1324 }; |
1316 | 1325 |
1317 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1326 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |