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

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: Default to 0 Ids in IntersitialPageImpl 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 RenderViewHostImpl::RenderViewHostImpl(SiteInstance* instance, 134 RenderViewHostImpl::RenderViewHostImpl(SiteInstance* instance,
135 RenderViewHostDelegate* delegate, 135 RenderViewHostDelegate* delegate,
136 int routing_id, 136 int routing_id,
137 bool swapped_out, 137 bool swapped_out,
138 SessionStorageNamespace* session_storage) 138 SessionStorageNamespace* session_storage)
139 : RenderWidgetHostImpl(instance->GetProcess(), routing_id), 139 : RenderWidgetHostImpl(instance->GetProcess(), routing_id),
140 delegate_(delegate), 140 delegate_(delegate),
141 instance_(static_cast<SiteInstanceImpl*>(instance)), 141 instance_(static_cast<SiteInstanceImpl*>(instance)),
142 waiting_for_drag_context_response_(false), 142 waiting_for_drag_context_response_(false),
143 enabled_bindings_(0), 143 enabled_bindings_(0),
144 guest_(false),
145 pending_request_id_(-1), 144 pending_request_id_(-1),
146 navigations_suspended_(false), 145 navigations_suspended_(false),
147 suspended_nav_message_(NULL), 146 suspended_nav_message_(NULL),
148 is_swapped_out_(swapped_out), 147 is_swapped_out_(swapped_out),
149 run_modal_reply_msg_(NULL), 148 run_modal_reply_msg_(NULL),
150 run_modal_opener_id_(MSG_ROUTING_NONE), 149 run_modal_opener_id_(MSG_ROUTING_NONE),
151 is_waiting_for_beforeunload_ack_(false), 150 is_waiting_for_beforeunload_ack_(false),
152 is_waiting_for_unload_ack_(false), 151 is_waiting_for_unload_ack_(false),
153 has_timed_out_on_unload_(false), 152 has_timed_out_on_unload_(false),
154 unload_ack_is_for_cross_site_transition_(false), 153 unload_ack_is_for_cross_site_transition_(false),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 content::RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { 199 content::RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const {
201 return delegate_; 200 return delegate_;
202 } 201 }
203 202
204 content::SiteInstance* RenderViewHostImpl::GetSiteInstance() const { 203 content::SiteInstance* RenderViewHostImpl::GetSiteInstance() const {
205 return instance_; 204 return instance_;
206 } 205 }
207 206
208 bool RenderViewHostImpl::CreateRenderView(const string16& frame_name, 207 bool RenderViewHostImpl::CreateRenderView(const string16& frame_name,
209 int opener_route_id, 208 int opener_route_id,
210 int32 max_page_id) { 209 int32 max_page_id,
210 int embedder_process_id,
211 int embedder_routing_id) {
211 DCHECK(!IsRenderViewLive()) << "Creating view twice"; 212 DCHECK(!IsRenderViewLive()) << "Creating view twice";
212 213
213 // The process may (if we're sharing a process with another host that already 214 // The process may (if we're sharing a process with another host that already
214 // initialized it) or may not (we have our own process or the old process 215 // initialized it) or may not (we have our own process or the old process
215 // crashed) have been initialized. Calling Init multiple times will be 216 // crashed) have been initialized. Calling Init multiple times will be
216 // ignored, so this is safe. 217 // ignored, so this is safe.
217 if (!GetProcess()->Init()) 218 if (!GetProcess()->Init())
218 return false; 219 return false;
219 DCHECK(GetProcess()->HasConnection()); 220 DCHECK(GetProcess()->HasConnection());
220 DCHECK(GetProcess()->GetBrowserContext()); 221 DCHECK(GetProcess()->GetBrowserContext());
(...skipping 28 matching lines...) Expand all
249 GetView())->GetScreenInfo(&params.screen_info); 250 GetView())->GetScreenInfo(&params.screen_info);
250 } else { 251 } else {
251 content::RenderWidgetHostViewPort::GetDefaultScreenInfo( 252 content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
252 &params.screen_info); 253 &params.screen_info);
253 } 254 }
254 #else 255 #else
255 params.screen_info = 256 params.screen_info =
256 WebKit::WebScreenInfoFactory::screenInfo( 257 WebKit::WebScreenInfoFactory::screenInfo(
257 gfx::NativeViewFromId(GetNativeViewId())); 258 gfx::NativeViewFromId(GetNativeViewId()));
258 #endif 259 #endif
259 params.guest = guest_; 260 params.embedder_process_id = embedder_process_id;
261 params.embedder_routing_id = embedder_routing_id;
260 params.accessibility_mode = 262 params.accessibility_mode =
261 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? 263 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ?
262 AccessibilityModeComplete : 264 AccessibilityModeComplete :
263 AccessibilityModeOff; 265 AccessibilityModeOff;
264 266
265 #if defined(OS_WIN) 267 #if defined(OS_WIN)
266 // On Windows 8, always enable accessibility for editable text controls 268 // On Windows 8, always enable accessibility for editable text controls
267 // so we can show the virtual keyboard when one is enabled. 269 // so we can show the virtual keyboard when one is enabled.
268 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 270 if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
269 params.accessibility_mode == AccessibilityModeOff) { 271 params.accessibility_mode == AccessibilityModeOff) {
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 is_waiting_for_beforeunload_ack_ = false; 1896 is_waiting_for_beforeunload_ack_ = false;
1895 is_waiting_for_unload_ack_ = false; 1897 is_waiting_for_unload_ack_ = false;
1896 has_timed_out_on_unload_ = false; 1898 has_timed_out_on_unload_ = false;
1897 } 1899 }
1898 1900
1899 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1901 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1900 STLDeleteValues(&power_save_blockers_); 1902 STLDeleteValues(&power_save_blockers_);
1901 } 1903 }
1902 1904
1903 } // namespace content 1905 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698