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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.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: Upload after sync for proper diffs 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_RENDERER_HOST_RENDER_VIEW_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/process_util.h"
12 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
13 #include "chrome/browser/renderer_host/render_widget_host.h" 14 #include "chrome/browser/renderer_host/render_widget_host.h"
14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 15 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
15 #include "chrome/common/content_settings_types.h" 16 #include "chrome/common/content_settings_types.h"
16 #include "chrome/common/page_zoom.h" 17 #include "chrome/common/page_zoom.h"
17 #include "chrome/common/translate_errors.h" 18 #include "chrome/common/translate_errors.h"
18 #include "chrome/common/view_types.h" 19 #include "chrome/common/view_types.h"
19 #include "chrome/common/window_container_type.h" 20 #include "chrome/common/window_container_type.h"
20 #include "net/base/load_states.h" 21 #include "net/base/load_states.h"
21 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" 22 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 // Set up the RenderView child process. Virtual because it is overridden by 121 // Set up the RenderView child process. Virtual because it is overridden by
121 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used 122 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used
122 // as the name of the new top-level frame. 123 // as the name of the new top-level frame.
123 virtual bool CreateRenderView(const string16& frame_name); 124 virtual bool CreateRenderView(const string16& frame_name);
124 125
125 // Returns true if the RenderView is active and has not crashed. Virtual 126 // Returns true if the RenderView is active and has not crashed. Virtual
126 // because it is overridden by TestRenderViewHost. 127 // because it is overridden by TestRenderViewHost.
127 virtual bool IsRenderViewLive() const; 128 virtual bool IsRenderViewLive() const;
128 129
130 base::TerminationStatus render_view_termination_status() const {
131 return render_view_termination_status_;
132 }
133
129 // Send the renderer process the current preferences supplied by the 134 // Send the renderer process the current preferences supplied by the
130 // RenderViewHostDelegate. 135 // RenderViewHostDelegate.
131 void SyncRendererPrefs(); 136 void SyncRendererPrefs();
132 137
133 // Sends the given navigation message. Use this rather than sending it 138 // Sends the given navigation message. Use this rather than sending it
134 // yourself since this does the internal bookkeeping described below. This 139 // yourself since this does the internal bookkeeping described below. This
135 // function takes ownership of the provided message pointer. 140 // function takes ownership of the provided message pointer.
136 // 141 //
137 // If a cross-site request is in progress, we may be suspended while waiting 142 // If a cross-site request is in progress, we may be suspended while waiting
138 // for the onbeforeunload handler, so this function might buffer the message 143 // for the onbeforeunload handler, so this function might buffer the message
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 547
543 // IPC message handlers. 548 // IPC message handlers.
544 void OnMsgShowView(int route_id, 549 void OnMsgShowView(int route_id,
545 WindowOpenDisposition disposition, 550 WindowOpenDisposition disposition,
546 const gfx::Rect& initial_pos, 551 const gfx::Rect& initial_pos,
547 bool user_gesture); 552 bool user_gesture);
548 void OnMsgShowWidget(int route_id, const gfx::Rect& initial_pos); 553 void OnMsgShowWidget(int route_id, const gfx::Rect& initial_pos);
549 void OnMsgShowFullscreenWidget(int route_id); 554 void OnMsgShowFullscreenWidget(int route_id);
550 void OnMsgRunModal(IPC::Message* reply_msg); 555 void OnMsgRunModal(IPC::Message* reply_msg);
551 void OnMsgRenderViewReady(); 556 void OnMsgRenderViewReady();
552 void OnMsgRenderViewGone(); 557 void OnMsgRenderViewGone(int status, int error_code);
553 void OnMsgNavigate(const IPC::Message& msg); 558 void OnMsgNavigate(const IPC::Message& msg);
554 void OnMsgUpdateState(int32 page_id, 559 void OnMsgUpdateState(int32 page_id,
555 const std::string& state); 560 const std::string& state);
556 void OnMsgUpdateTitle(int32 page_id, const std::wstring& title); 561 void OnMsgUpdateTitle(int32 page_id, const std::wstring& title);
557 void OnMsgUpdateEncoding(const std::string& encoding); 562 void OnMsgUpdateEncoding(const std::string& encoding);
558 void OnMsgUpdateTargetURL(int32 page_id, const GURL& url); 563 void OnMsgUpdateTargetURL(int32 page_id, const GURL& url);
559 void OnMsgThumbnail(const GURL& url, 564 void OnMsgThumbnail(const GURL& url,
560 const ThumbnailScore& score, 565 const ThumbnailScore& score,
561 const SkBitmap& bitmap); 566 const SkBitmap& bitmap);
562 void OnMsgScreenshot(const SkBitmap& bitmap); 567 void OnMsgScreenshot(const SkBitmap& bitmap);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 std::vector<string16> autofill_icons_; 816 std::vector<string16> autofill_icons_;
812 std::vector<int> autofill_unique_ids_; 817 std::vector<int> autofill_unique_ids_;
813 int autofill_query_id_; 818 int autofill_query_id_;
814 819
815 // Whether the accessibility tree should be saved, for unit testing. 820 // Whether the accessibility tree should be saved, for unit testing.
816 bool save_accessibility_tree_for_testing_; 821 bool save_accessibility_tree_for_testing_;
817 822
818 // The most recently received accessibility tree - for unit testing only. 823 // The most recently received accessibility tree - for unit testing only.
819 webkit_glue::WebAccessibility accessibility_tree_; 824 webkit_glue::WebAccessibility accessibility_tree_;
820 825
826 // The termination status of the last render view that terminated.
827 base::TerminationStatus render_view_termination_status_;
828
821 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); 829 DISALLOW_COPY_AND_ASSIGN(RenderViewHost);
822 }; 830 };
823 831
824 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ 832 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698