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

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

Issue 23129015: Initialize RenderWidget(Host)(View)s with correct visibility state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return static_cast<RenderViewHostImpl*>( 146 return static_cast<RenderViewHostImpl*>(
147 RenderViewHost::FromID(render_process_id, render_view_id)); 147 RenderViewHost::FromID(render_process_id, render_view_id));
148 } 148 }
149 149
150 RenderViewHostImpl::RenderViewHostImpl( 150 RenderViewHostImpl::RenderViewHostImpl(
151 SiteInstance* instance, 151 SiteInstance* instance,
152 RenderViewHostDelegate* delegate, 152 RenderViewHostDelegate* delegate,
153 RenderWidgetHostDelegate* widget_delegate, 153 RenderWidgetHostDelegate* widget_delegate,
154 int routing_id, 154 int routing_id,
155 int main_frame_routing_id, 155 int main_frame_routing_id,
156 bool swapped_out) 156 bool swapped_out,
157 : RenderWidgetHostImpl(widget_delegate, instance->GetProcess(), routing_id), 157 bool hidden)
158 : RenderWidgetHostImpl(widget_delegate,
159 instance->GetProcess(),
160 routing_id,
161 hidden),
158 delegate_(delegate), 162 delegate_(delegate),
159 instance_(static_cast<SiteInstanceImpl*>(instance)), 163 instance_(static_cast<SiteInstanceImpl*>(instance)),
160 waiting_for_drag_context_response_(false), 164 waiting_for_drag_context_response_(false),
161 enabled_bindings_(0), 165 enabled_bindings_(0),
162 navigations_suspended_(false), 166 navigations_suspended_(false),
163 has_accessed_initial_document_(false), 167 has_accessed_initial_document_(false),
164 is_swapped_out_(swapped_out), 168 is_swapped_out_(swapped_out),
165 is_subframe_(false), 169 is_subframe_(false),
166 main_frame_id_(-1), 170 main_frame_id_(-1),
167 run_modal_reply_msg_(NULL), 171 run_modal_reply_msg_(NULL),
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 params.web_preferences = delegate_->GetWebkitPrefs(); 256 params.web_preferences = delegate_->GetWebkitPrefs();
253 params.view_id = GetRoutingID(); 257 params.view_id = GetRoutingID();
254 params.main_frame_routing_id = main_render_frame_host_->routing_id(); 258 params.main_frame_routing_id = main_render_frame_host_->routing_id();
255 params.surface_id = surface_id(); 259 params.surface_id = surface_id();
256 params.session_storage_namespace_id = 260 params.session_storage_namespace_id =
257 delegate_->GetSessionStorageNamespace(instance_)->id(); 261 delegate_->GetSessionStorageNamespace(instance_)->id();
258 params.frame_name = frame_name; 262 params.frame_name = frame_name;
259 // Ensure the RenderView sets its opener correctly. 263 // Ensure the RenderView sets its opener correctly.
260 params.opener_route_id = opener_route_id; 264 params.opener_route_id = opener_route_id;
261 params.swapped_out = is_swapped_out_; 265 params.swapped_out = is_swapped_out_;
266 params.hidden = is_hidden();
262 params.next_page_id = next_page_id; 267 params.next_page_id = next_page_id;
263 GetWebScreenInfo(&params.screen_info); 268 GetWebScreenInfo(&params.screen_info);
264 params.accessibility_mode = accessibility_mode(); 269 params.accessibility_mode = accessibility_mode();
265 params.allow_partial_swap = !GetProcess()->IsGuest(); 270 params.allow_partial_swap = !GetProcess()->IsGuest();
266 271
267 Send(new ViewMsg_New(params)); 272 Send(new ViewMsg_New(params));
268 273
269 // If it's enabled, tell the renderer to set up the Javascript bindings for 274 // If it's enabled, tell the renderer to set up the Javascript bindings for
270 // sending messages back to the browser. 275 // sending messages back to the browser.
271 if (GetProcess()->IsGuest()) 276 if (GetProcess()->IsGuest())
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); 2055 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles();
2051 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); 2056 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin();
2052 file != file_paths.end(); ++file) { 2057 file != file_paths.end(); ++file) {
2053 if (!policy->CanReadFile(GetProcess()->GetID(), *file)) 2058 if (!policy->CanReadFile(GetProcess()->GetID(), *file))
2054 return false; 2059 return false;
2055 } 2060 }
2056 return true; 2061 return true;
2057 } 2062 }
2058 2063
2059 } // namespace content 2064 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698