Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/tab_contents/tab_contents.h

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final review changes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 virtual RenderViewHostDelegate::AutoFill* GetAutoFillDelegate(); 951 virtual RenderViewHostDelegate::AutoFill* GetAutoFillDelegate();
946 virtual RenderViewHostDelegate::SSL* GetSSLDelegate(); 952 virtual RenderViewHostDelegate::SSL* GetSSLDelegate();
947 virtual RenderViewHostDelegate::FileSelect* GetFileSelectDelegate(); 953 virtual RenderViewHostDelegate::FileSelect* GetFileSelectDelegate();
948 virtual AutomationResourceRoutingDelegate* 954 virtual AutomationResourceRoutingDelegate*
949 GetAutomationResourceRoutingDelegate(); 955 GetAutomationResourceRoutingDelegate();
950 virtual TabContents* GetAsTabContents(); 956 virtual TabContents* GetAsTabContents();
951 virtual ViewType::Type GetRenderViewType() const; 957 virtual ViewType::Type GetRenderViewType() const;
952 virtual int GetBrowserWindowID() const; 958 virtual int GetBrowserWindowID() const;
953 virtual void RenderViewCreated(RenderViewHost* render_view_host); 959 virtual void RenderViewCreated(RenderViewHost* render_view_host);
954 virtual void RenderViewReady(RenderViewHost* render_view_host); 960 virtual void RenderViewReady(RenderViewHost* render_view_host);
955 virtual void RenderViewGone(RenderViewHost* render_view_host); 961 virtual void RenderViewGone(RenderViewHost* render_view_host,
962 base::TerminationStatus status,
963 int error_code);
956 virtual void RenderViewDeleted(RenderViewHost* render_view_host); 964 virtual void RenderViewDeleted(RenderViewHost* render_view_host);
957 virtual void DidNavigate(RenderViewHost* render_view_host, 965 virtual void DidNavigate(RenderViewHost* render_view_host,
958 const ViewHostMsg_FrameNavigate_Params& params); 966 const ViewHostMsg_FrameNavigate_Params& params);
959 virtual void UpdateState(RenderViewHost* render_view_host, 967 virtual void UpdateState(RenderViewHost* render_view_host,
960 int32 page_id, 968 int32 page_id,
961 const std::string& state); 969 const std::string& state);
962 virtual void UpdateTitle(RenderViewHost* render_view_host, 970 virtual void UpdateTitle(RenderViewHost* render_view_host,
963 int32 page_id, 971 int32 page_id,
964 const std::wstring& title); 972 const std::wstring& title);
965 virtual void UpdateEncoding(RenderViewHost* render_view_host, 973 virtual void UpdateEncoding(RenderViewHost* render_view_host,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 1141
1134 // RenderViewHost::ContentSettingsDelegate. 1142 // RenderViewHost::ContentSettingsDelegate.
1135 scoped_ptr<TabSpecificContentSettings> content_settings_delegate_; 1143 scoped_ptr<TabSpecificContentSettings> content_settings_delegate_;
1136 1144
1137 // Data for loading state ---------------------------------------------------- 1145 // Data for loading state ----------------------------------------------------
1138 1146
1139 // Indicates whether we're currently loading a resource. 1147 // Indicates whether we're currently loading a resource.
1140 bool is_loading_; 1148 bool is_loading_;
1141 1149
1142 // Indicates if the tab is considered crashed. 1150 // Indicates if the tab is considered crashed.
1143 bool is_crashed_; 1151 base::TerminationStatus crashed_status_;
1152 int crashed_error_code_;
1144 1153
1145 // See waiting_for_response() above. 1154 // See waiting_for_response() above.
1146 bool waiting_for_response_; 1155 bool waiting_for_response_;
1147 1156
1148 // Indicates the largest PageID we've seen. This field is ignored if we are 1157 // Indicates the largest PageID we've seen. This field is ignored if we are
1149 // a TabContents, in which case the max page ID is stored separately with 1158 // a TabContents, in which case the max page ID is stored separately with
1150 // each SiteInstance. 1159 // each SiteInstance.
1151 // TODO(brettw) this seems like it can be removed according to the comment. 1160 // TODO(brettw) this seems like it can be removed according to the comment.
1152 int32 max_page_id_; 1161 int32 max_page_id_;
1153 1162
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 // Content restrictions, used to disable print/copy etc based on content's 1334 // Content restrictions, used to disable print/copy etc based on content's
1326 // (full-page plugins for now only) permissions. 1335 // (full-page plugins for now only) permissions.
1327 int content_restrictions_; 1336 int content_restrictions_;
1328 1337
1329 // --------------------------------------------------------------------------- 1338 // ---------------------------------------------------------------------------
1330 1339
1331 DISALLOW_COPY_AND_ASSIGN(TabContents); 1340 DISALLOW_COPY_AND_ASSIGN(TabContents);
1332 }; 1341 };
1333 1342
1334 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 1343 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698