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

Side by Side Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 20185: Adds some debugging code in hopes of isolating bug 6316. I suspect the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_host_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/renderer_host/render_view_host.h" 5 #include "chrome/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gfx/native_widget_types.h" 10 #include "base/gfx/native_widget_types.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/waitable_event.h" 12 #include "base/waitable_event.h"
13 #include "chrome/app/result_codes.h" 13 #include "chrome/app/result_codes.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/cross_site_request_manager.h" 15 #include "chrome/browser/cross_site_request_manager.h"
16 #include "chrome/browser/profile.h" 16 #include "chrome/browser/profile.h"
17 #include "chrome/browser/metrics/user_metrics.h" 17 #include "chrome/browser/metrics/user_metrics.h"
18 #include "chrome/browser/renderer_host/renderer_security_policy.h" 18 #include "chrome/browser/renderer_host/renderer_security_policy.h"
19 #include "chrome/browser/renderer_host/render_process_host.h" 19 #include "chrome/browser/renderer_host/render_process_host.h"
20 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 20 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
21 #include "chrome/browser/renderer_host/render_widget_host.h" 21 #include "chrome/browser/renderer_host/render_widget_host.h"
22 #include "chrome/browser/renderer_host/render_widget_host_view.h" 22 #include "chrome/browser/renderer_host/render_widget_host_view.h"
23 #include "chrome/browser/tab_contents/navigation_entry.h" 23 #include "chrome/browser/tab_contents/navigation_entry.h"
24 #include "chrome/browser/tab_contents/site_instance.h" 24 #include "chrome/browser/tab_contents/site_instance.h"
25 #include "chrome/browser/tab_contents/web_contents.h" 25 #include "chrome/browser/tab_contents/web_contents.h"
26 #include "chrome/common/render_messages.h" 26 #include "chrome/common/render_messages.h"
27 #include "chrome/common/resource_bundle.h" 27 #include "chrome/common/resource_bundle.h"
28 #include "chrome/common/notification_service.h"
29 #include "chrome/common/notification_type.h"
28 #include "chrome/common/thumbnail_score.h" 30 #include "chrome/common/thumbnail_score.h"
29 #include "net/base/net_util.h" 31 #include "net/base/net_util.h"
30 #include "skia/include/SkBitmap.h" 32 #include "skia/include/SkBitmap.h"
31 #include "webkit/glue/autofill_form.h" 33 #include "webkit/glue/autofill_form.h"
32 34
33 #if defined(OS_WIN) 35 #if defined(OS_WIN)
34 // TODO(port): remove these when stubs are filled in 36 // TODO(port): remove these when stubs are filled in
35 #include "chrome/browser/debugger/debugger_wrapper.h" 37 #include "chrome/browser/debugger/debugger_wrapper.h"
36 #endif 38 #endif
37 39
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 OnDebugDisconnect(); 116 OnDebugDisconnect();
115 117
116 #ifdef CHROME_PERSONALIZATION 118 #ifdef CHROME_PERSONALIZATION
117 Personalization::CleanupHostPersonalization(personalization_); 119 Personalization::CleanupHostPersonalization(personalization_);
118 personalization_ = NULL; 120 personalization_ = NULL;
119 #endif 121 #endif
120 122
121 // Be sure to clean up any leftover state from cross-site requests. 123 // Be sure to clean up any leftover state from cross-site requests.
122 Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest( 124 Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest(
123 process()->host_id(), routing_id(), false); 125 process()->host_id(), routing_id(), false);
126
127 NotificationService::current()->Notify(
128 NotificationType::RENDER_VIEW_HOST_DELETED,
129 Source<RenderViewHost>(this),
130 NotificationService::NoDetails());
124 } 131 }
125 132
126 bool RenderViewHost::CreateRenderView() { 133 bool RenderViewHost::CreateRenderView() {
127 DCHECK(!IsRenderViewLive()) << "Creating view twice"; 134 DCHECK(!IsRenderViewLive()) << "Creating view twice";
128 135
129 // The process may (if we're sharing a process with another host that already 136 // The process may (if we're sharing a process with another host that already
130 // initialized it) or may not (we have our own process or the old process 137 // initialized it) or may not (we have our own process or the old process
131 // crashed) have been initialized. Calling Init multiple times will be 138 // crashed) have been initialized. Calling Init multiple times will be
132 // ignored, so this is safe. 139 // ignored, so this is safe.
133 if (!process()->Init()) 140 if (!process()->Init())
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 std::string event_arg) { 1292 std::string event_arg) {
1286 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg)); 1293 Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg));
1287 } 1294 }
1288 #endif 1295 #endif
1289 1296
1290 void RenderViewHost::ForwardMessageFromExternalHost( 1297 void RenderViewHost::ForwardMessageFromExternalHost(
1291 const std::string& target, const std::string& message) { 1298 const std::string& target, const std::string& message) {
1292 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target, 1299 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), target,
1293 message)); 1300 message));
1294 } 1301 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/render_view_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698