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 #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 <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 DCHECK(instance_); | 138 DCHECK(instance_); |
139 DCHECK(delegate_); | 139 DCHECK(delegate_); |
140 } | 140 } |
141 | 141 |
142 RenderViewHost::~RenderViewHost() { | 142 RenderViewHost::~RenderViewHost() { |
143 delegate()->RenderViewDeleted(this); | 143 delegate()->RenderViewDeleted(this); |
144 | 144 |
145 // Be sure to clean up any leftover state from cross-site requests. | 145 // Be sure to clean up any leftover state from cross-site requests. |
146 Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest( | 146 Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest( |
147 process()->id(), routing_id(), false); | 147 process()->id(), routing_id(), false); |
148 | |
149 NotificationService::current()->Notify( | |
150 NotificationType::EXTENSION_PORT_DELETED_DEBUG, | |
151 Source<IPC::Message::Sender>(this), | |
152 NotificationService::NoDetails()); | |
153 } | 148 } |
154 | 149 |
155 bool RenderViewHost::CreateRenderView(const string16& frame_name) { | 150 bool RenderViewHost::CreateRenderView(const string16& frame_name) { |
156 DCHECK(!IsRenderViewLive()) << "Creating view twice"; | 151 DCHECK(!IsRenderViewLive()) << "Creating view twice"; |
157 | 152 |
158 // The process may (if we're sharing a process with another host that already | 153 // The process may (if we're sharing a process with another host that already |
159 // initialized it) or may not (we have our own process or the old process | 154 // initialized it) or may not (we have our own process or the old process |
160 // crashed) have been initialized. Calling Init multiple times will be | 155 // crashed) have been initialized. Calling Init multiple times will be |
161 // ignored, so this is safe. | 156 // ignored, so this is safe. |
162 if (!process()->Init(is_extension_process_)) | 157 if (!process()->Init(is_extension_process_)) |
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 RenderViewHostDelegate::ContentSettings* content_settings_delegate = | 2019 RenderViewHostDelegate::ContentSettings* content_settings_delegate = |
2025 delegate_->GetContentSettingsDelegate(); | 2020 delegate_->GetContentSettingsDelegate(); |
2026 if (content_settings_delegate) | 2021 if (content_settings_delegate) |
2027 content_settings_delegate->OnWebDatabaseAccessed( | 2022 content_settings_delegate->OnWebDatabaseAccessed( |
2028 url, name, display_name, estimated_size, blocked_by_policy); | 2023 url, name, display_name, estimated_size, blocked_by_policy); |
2029 } | 2024 } |
2030 | 2025 |
2031 void RenderViewHost::OnSetDisplayingPDFContent() { | 2026 void RenderViewHost::OnSetDisplayingPDFContent() { |
2032 delegate_->SetDisplayingPDFContent(); | 2027 delegate_->SetDisplayingPDFContent(); |
2033 } | 2028 } |
OLD | NEW |