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

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

Issue 10378089: Browser Plugin: Removed BrowserPluginWebContentsObserver (to be replaced by rewritten BrowserPlugi… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to jam@ Created 8 years, 7 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 RenderViewHostImpl::RenderViewHostImpl(SiteInstance* instance, 133 RenderViewHostImpl::RenderViewHostImpl(SiteInstance* instance,
134 RenderViewHostDelegate* delegate, 134 RenderViewHostDelegate* delegate,
135 int routing_id, 135 int routing_id,
136 bool swapped_out, 136 bool swapped_out,
137 SessionStorageNamespace* session_storage) 137 SessionStorageNamespace* session_storage)
138 : RenderWidgetHostImpl(instance->GetProcess(), routing_id), 138 : RenderWidgetHostImpl(instance->GetProcess(), routing_id),
139 delegate_(delegate), 139 delegate_(delegate),
140 instance_(static_cast<SiteInstanceImpl*>(instance)), 140 instance_(static_cast<SiteInstanceImpl*>(instance)),
141 waiting_for_drag_context_response_(false), 141 waiting_for_drag_context_response_(false),
142 enabled_bindings_(0), 142 enabled_bindings_(0),
143 guest_(false),
144 pending_request_id_(-1), 143 pending_request_id_(-1),
145 navigations_suspended_(false), 144 navigations_suspended_(false),
146 suspended_nav_message_(NULL), 145 suspended_nav_message_(NULL),
147 is_swapped_out_(swapped_out), 146 is_swapped_out_(swapped_out),
148 run_modal_reply_msg_(NULL), 147 run_modal_reply_msg_(NULL),
149 run_modal_opener_id_(MSG_ROUTING_NONE), 148 run_modal_opener_id_(MSG_ROUTING_NONE),
150 is_waiting_for_beforeunload_ack_(false), 149 is_waiting_for_beforeunload_ack_(false),
151 is_waiting_for_unload_ack_(false), 150 is_waiting_for_unload_ack_(false),
152 unload_ack_is_for_cross_site_transition_(false), 151 unload_ack_is_for_cross_site_transition_(false),
153 are_javascript_messages_suppressed_(false), 152 are_javascript_messages_suppressed_(false),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 content::RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { 197 content::RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const {
199 return delegate_; 198 return delegate_;
200 } 199 }
201 200
202 content::SiteInstance* RenderViewHostImpl::GetSiteInstance() const { 201 content::SiteInstance* RenderViewHostImpl::GetSiteInstance() const {
203 return instance_; 202 return instance_;
204 } 203 }
205 204
206 bool RenderViewHostImpl::CreateRenderView(const string16& frame_name, 205 bool RenderViewHostImpl::CreateRenderView(const string16& frame_name,
207 int opener_route_id, 206 int opener_route_id,
208 int32 max_page_id) { 207 int32 max_page_id,
208 int embedder_process_id) {
209 DCHECK(!IsRenderViewLive()) << "Creating view twice"; 209 DCHECK(!IsRenderViewLive()) << "Creating view twice";
210 210
211 // The process may (if we're sharing a process with another host that already 211 // The process may (if we're sharing a process with another host that already
212 // initialized it) or may not (we have our own process or the old process 212 // initialized it) or may not (we have our own process or the old process
213 // crashed) have been initialized. Calling Init multiple times will be 213 // crashed) have been initialized. Calling Init multiple times will be
214 // ignored, so this is safe. 214 // ignored, so this is safe.
215 if (!GetProcess()->Init()) 215 if (!GetProcess()->Init())
216 return false; 216 return false;
217 DCHECK(GetProcess()->HasConnection()); 217 DCHECK(GetProcess()->HasConnection());
218 DCHECK(GetProcess()->GetBrowserContext()); 218 DCHECK(GetProcess()->GetBrowserContext());
(...skipping 28 matching lines...) Expand all
247 GetView())->GetScreenInfo(&params.screen_info); 247 GetView())->GetScreenInfo(&params.screen_info);
248 } else { 248 } else {
249 content::RenderWidgetHostViewPort::GetDefaultScreenInfo( 249 content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
250 &params.screen_info); 250 &params.screen_info);
251 } 251 }
252 #else 252 #else
253 params.screen_info = 253 params.screen_info =
254 WebKit::WebScreenInfoFactory::screenInfo( 254 WebKit::WebScreenInfoFactory::screenInfo(
255 gfx::NativeViewFromId(GetNativeViewId())); 255 gfx::NativeViewFromId(GetNativeViewId()));
256 #endif 256 #endif
257 params.guest = guest_; 257
258 if (embedder_process_id != -1)
259 params.embedder_channel_name =
260 StringPrintf("%d.r%d", GetProcess()->GetID(), embedder_process_id);
jam 2012/05/15 00:05:06 someone from the security team should take a look
jschuh 2012/05/15 00:43:35 Thanks John. It should probably be changed to some
Fady Samuel 2012/05/15 02:09:15 Hi Justin, I don't quite understand the purpose o
jschuh 2012/05/15 15:49:44 The client gets a channel ID including the nonce v
261
258 params.accessibility_mode = 262 params.accessibility_mode =
259 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? 263 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ?
260 AccessibilityModeComplete : 264 AccessibilityModeComplete :
261 AccessibilityModeOff; 265 AccessibilityModeOff;
262 266
263 #if defined(OS_WIN) 267 #if defined(OS_WIN)
264 // On Windows 8, always enable accessibility for editable text controls 268 // On Windows 8, always enable accessibility for editable text controls
265 // so we can show the virtual keyboard when one is enabled. 269 // so we can show the virtual keyboard when one is enabled.
266 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 270 if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
267 params.accessibility_mode == AccessibilityModeOff) { 271 params.accessibility_mode == AccessibilityModeOff) {
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 // can cause navigations to be ignored in OnMsgNavigate. 1826 // can cause navigations to be ignored in OnMsgNavigate.
1823 is_waiting_for_beforeunload_ack_ = false; 1827 is_waiting_for_beforeunload_ack_ = false;
1824 is_waiting_for_unload_ack_ = false; 1828 is_waiting_for_unload_ack_ = false;
1825 } 1829 }
1826 1830
1827 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1831 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1828 STLDeleteValues(&power_save_blockers_); 1832 STLDeleteValues(&power_save_blockers_);
1829 } 1833 }
1830 1834
1831 } // namespace content 1835 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698