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

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

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
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 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 unload_ack_is_for_cross_site_transition_(false), 181 unload_ack_is_for_cross_site_transition_(false),
182 are_javascript_messages_suppressed_(false), 182 are_javascript_messages_suppressed_(false),
183 accessibility_layout_callback_(base::Bind(&base::DoNothing)), 183 accessibility_layout_callback_(base::Bind(&base::DoNothing)),
184 accessibility_load_callback_(base::Bind(&base::DoNothing)), 184 accessibility_load_callback_(base::Bind(&base::DoNothing)),
185 accessibility_other_callback_(base::Bind(&base::DoNothing)), 185 accessibility_other_callback_(base::Bind(&base::DoNothing)),
186 sudden_termination_allowed_(false), 186 sudden_termination_allowed_(false),
187 session_storage_namespace_( 187 session_storage_namespace_(
188 static_cast<SessionStorageNamespaceImpl*>(session_storage)), 188 static_cast<SessionStorageNamespaceImpl*>(session_storage)),
189 save_accessibility_tree_for_testing_(false), 189 save_accessibility_tree_for_testing_(false),
190 render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) { 190 render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) {
191 DCHECK(session_storage_namespace_); 191 DCHECK(session_storage_namespace_.get());
192 DCHECK(instance_); 192 DCHECK(instance_.get());
193 CHECK(delegate_); // http://crbug.com/82827 193 CHECK(delegate_); // http://crbug.com/82827
194 194
195 if (main_frame_routing_id == MSG_ROUTING_NONE) 195 if (main_frame_routing_id == MSG_ROUTING_NONE)
196 main_frame_routing_id = GetProcess()->GetNextRoutingID(); 196 main_frame_routing_id = GetProcess()->GetNextRoutingID();
197 197
198 main_render_frame_host_.reset( 198 main_render_frame_host_.reset(
199 new RenderFrameHostImpl(this, main_frame_routing_id, is_swapped_out_)); 199 new RenderFrameHostImpl(this, main_frame_routing_id, is_swapped_out_));
200 200
201 GetProcess()->EnableSendQueue(); 201 GetProcess()->EnableSendQueue();
202 202
(...skipping 16 matching lines...) Expand all
219 // Be sure to clean up any leftover state from cross-site requests. 219 // Be sure to clean up any leftover state from cross-site requests.
220 CrossSiteRequestManager::GetInstance()->SetHasPendingCrossSiteRequest( 220 CrossSiteRequestManager::GetInstance()->SetHasPendingCrossSiteRequest(
221 GetProcess()->GetID(), GetRoutingID(), false); 221 GetProcess()->GetID(), GetRoutingID(), false);
222 } 222 }
223 223
224 RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { 224 RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const {
225 return delegate_; 225 return delegate_;
226 } 226 }
227 227
228 SiteInstance* RenderViewHostImpl::GetSiteInstance() const { 228 SiteInstance* RenderViewHostImpl::GetSiteInstance() const {
229 return instance_; 229 return instance_.get();
230 } 230 }
231 231
232 bool RenderViewHostImpl::CreateRenderView( 232 bool RenderViewHostImpl::CreateRenderView(
233 const string16& frame_name, 233 const string16& frame_name,
234 int opener_route_id, 234 int opener_route_id,
235 int32 max_page_id) { 235 int32 max_page_id) {
236 DCHECK(!IsRenderViewLive()) << "Creating view twice"; 236 DCHECK(!IsRenderViewLive()) << "Creating view twice";
237 237
238 // The process may (if we're sharing a process with another host that already 238 // The process may (if we're sharing a process with another host that already
239 // initialized it) or may not (we have our own process or the old process 239 // initialized it) or may not (we have our own process or the old process
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); 2089 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles();
2090 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); 2090 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin();
2091 file != file_paths.end(); ++file) { 2091 file != file_paths.end(); ++file) {
2092 if (!policy->CanReadFile(GetProcess()->GetID(), *file)) 2092 if (!policy->CanReadFile(GetProcess()->GetID(), *file))
2093 return false; 2093 return false;
2094 } 2094 }
2095 return true; 2095 return true;
2096 } 2096 }
2097 2097
2098 } // namespace content 2098 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698