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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 1159183002: Improve process crash handling in RenderViewHost & mock RenderProcessHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile problem in webview_interactive_uitest.cc Created 5 years, 6 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/process/kill.h" 16 #include "base/process/kill.h"
17 #include "content/browser/renderer_host/render_widget_host_impl.h" 17 #include "content/browser/renderer_host/render_widget_host_impl.h"
18 #include "content/browser/site_instance_impl.h" 18 #include "content/browser/site_instance_impl.h"
19 #include "content/common/drag_event_source_info.h" 19 #include "content/common/drag_event_source_info.h"
20 #include "content/public/browser/notification_observer.h" 20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/render_process_host_observer.h"
21 #include "content/public/browser/render_view_host.h" 22 #include "content/public/browser/render_view_host.h"
22 #include "content/public/common/window_container_type.h" 23 #include "content/public/common/window_container_type.h"
23 #include "net/base/load_states.h" 24 #include "net/base/load_states.h"
24 #include "third_party/WebKit/public/web/WebAXEnums.h" 25 #include "third_party/WebKit/public/web/WebAXEnums.h"
25 #include "third_party/WebKit/public/web/WebConsoleMessage.h" 26 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
26 #include "third_party/WebKit/public/web/WebPopupType.h" 27 #include "third_party/WebKit/public/web/WebPopupType.h"
27 #include "third_party/skia/include/core/SkColor.h" 28 #include "third_party/skia/include/core/SkColor.h"
28 #include "ui/base/window_open_disposition.h" 29 #include "ui/base/window_open_disposition.h"
29 30
30 class SkBitmap; 31 class SkBitmap;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // can be shared by others. 86 // can be shared by others.
86 // 87 //
87 // DEPRECATED: RenderViewHostImpl is being removed as part of the SiteIsolation 88 // DEPRECATED: RenderViewHostImpl is being removed as part of the SiteIsolation
88 // project. New code should not be added here, but to either RenderFrameHostImpl 89 // project. New code should not be added here, but to either RenderFrameHostImpl
89 // (if frame specific) or WebContentsImpl (if page specific). 90 // (if frame specific) or WebContentsImpl (if page specific).
90 // 91 //
91 // For context, please see https://crbug.com/467770 and 92 // For context, please see https://crbug.com/467770 and
92 // http://www.chromium.org/developers/design-documents/site-isolation. 93 // http://www.chromium.org/developers/design-documents/site-isolation.
93 class CONTENT_EXPORT RenderViewHostImpl 94 class CONTENT_EXPORT RenderViewHostImpl
94 : public RenderViewHost, 95 : public RenderViewHost,
95 public RenderWidgetHostImpl { 96 public RenderWidgetHostImpl,
97 public RenderProcessHostObserver {
96 public: 98 public:
97 // Convenience function, just like RenderViewHost::FromID. 99 // Convenience function, just like RenderViewHost::FromID.
98 static RenderViewHostImpl* FromID(int render_process_id, int render_view_id); 100 static RenderViewHostImpl* FromID(int render_process_id, int render_view_id);
99 101
100 // |routing_id| could be a valid route id, or it could be MSG_ROUTING_NONE, in 102 // |routing_id| could be a valid route id, or it could be MSG_ROUTING_NONE, in
101 // which case RenderWidgetHost will create a new one. |swapped_out| indicates 103 // which case RenderWidgetHost will create a new one. |swapped_out| indicates
102 // whether the view should initially be swapped out (e.g., for an opener 104 // whether the view should initially be swapped out (e.g., for an opener
103 // frame being rendered by another process). |hidden| indicates whether the 105 // frame being rendered by another process). |hidden| indicates whether the
104 // view is initially hidden or visible. 106 // view is initially hidden or visible.
105 // 107 //
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 WebPreferences GetWebkitPreferences() override; 175 WebPreferences GetWebkitPreferences() override;
174 void UpdateWebkitPreferences(const WebPreferences& prefs) override; 176 void UpdateWebkitPreferences(const WebPreferences& prefs) override;
175 void OnWebkitPreferencesChanged() override; 177 void OnWebkitPreferencesChanged() override;
176 void SelectWordAroundCaret() override; 178 void SelectWordAroundCaret() override;
177 179
178 #if defined(OS_ANDROID) 180 #if defined(OS_ANDROID)
179 void ActivateNearestFindResult(int request_id, float x, float y) override; 181 void ActivateNearestFindResult(int request_id, float x, float y) override;
180 void RequestFindMatchRects(int current_version) override; 182 void RequestFindMatchRects(int current_version) override;
181 #endif 183 #endif
182 184
185 // RenderProcessHostObserver implementation
186 void RenderProcessExited(RenderProcessHost* host,
187 base::TerminationStatus status,
188 int exit_code) override;
189
183 void set_delegate(RenderViewHostDelegate* d) { 190 void set_delegate(RenderViewHostDelegate* d) {
184 CHECK(d); // http://crbug.com/82827 191 CHECK(d); // http://crbug.com/82827
185 delegate_ = d; 192 delegate_ = d;
186 } 193 }
187 194
188 // Set up the RenderView child process. Virtual because it is overridden by 195 // Set up the RenderView child process. Virtual because it is overridden by
189 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used 196 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used
190 // as the name of the new top-level frame. 197 // as the name of the new top-level frame.
191 // The |opener_route_id| parameter indicates which RenderView created this 198 // The |opener_route_id| parameter indicates which RenderView created this
192 // (MSG_ROUTING_NONE if none). If |max_page_id| is larger than -1, the 199 // (MSG_ROUTING_NONE if none). If |max_page_id| is larger than -1, the
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 465 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
459 }; 466 };
460 467
461 #if defined(COMPILER_MSVC) 468 #if defined(COMPILER_MSVC)
462 #pragma warning(pop) 469 #pragma warning(pop)
463 #endif 470 #endif
464 471
465 } // namespace content 472 } // namespace content
466 473
467 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 474 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698