OLD | NEW |
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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); | 234 delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); |
235 params.web_preferences = delegate_->GetWebkitPrefs(); | 235 params.web_preferences = delegate_->GetWebkitPrefs(); |
236 params.view_id = GetRoutingID(); | 236 params.view_id = GetRoutingID(); |
237 params.surface_id = surface_id(); | 237 params.surface_id = surface_id(); |
238 params.session_storage_namespace_id = session_storage_namespace_->id(); | 238 params.session_storage_namespace_id = session_storage_namespace_->id(); |
239 params.frame_name = frame_name; | 239 params.frame_name = frame_name; |
240 // Ensure the RenderView sets its opener correctly. | 240 // Ensure the RenderView sets its opener correctly. |
241 params.opener_route_id = opener_route_id; | 241 params.opener_route_id = opener_route_id; |
242 params.swapped_out = is_swapped_out_; | 242 params.swapped_out = is_swapped_out_; |
243 params.next_page_id = next_page_id; | 243 params.next_page_id = next_page_id; |
244 #if defined(OS_POSIX) || defined(USE_AURA) | |
245 if (GetView()) { | |
246 static_cast<content::RenderWidgetHostViewPort*>( | |
247 GetView())->GetScreenInfo(¶ms.screen_info); | |
248 } else { | |
249 content::RenderWidgetHostViewPort::GetDefaultScreenInfo( | |
250 ¶ms.screen_info); | |
251 } | |
252 #else | |
253 params.screen_info = | |
254 WebKit::WebScreenInfoFactory::screenInfo( | |
255 gfx::NativeViewFromId(GetNativeViewId())); | |
256 #endif | |
257 params.guest = guest_; | 244 params.guest = guest_; |
258 params.accessibility_mode = | 245 params.accessibility_mode = |
259 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? | 246 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? |
260 AccessibilityModeComplete : | 247 AccessibilityModeComplete : |
261 AccessibilityModeOff; | 248 AccessibilityModeOff; |
262 | 249 |
263 Send(new ViewMsg_New(params)); | 250 Send(new ViewMsg_New(params)); |
264 | 251 |
265 // If it's enabled, tell the renderer to set up the Javascript bindings for | 252 // If it's enabled, tell the renderer to set up the Javascript bindings for |
266 // sending messages back to the browser. | 253 // sending messages back to the browser. |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 // can cause navigations to be ignored in OnMsgNavigate. | 1768 // can cause navigations to be ignored in OnMsgNavigate. |
1782 is_waiting_for_beforeunload_ack_ = false; | 1769 is_waiting_for_beforeunload_ack_ = false; |
1783 is_waiting_for_unload_ack_ = false; | 1770 is_waiting_for_unload_ack_ = false; |
1784 } | 1771 } |
1785 | 1772 |
1786 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1773 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1787 STLDeleteValues(&power_save_blockers_); | 1774 STLDeleteValues(&power_save_blockers_); |
1788 } | 1775 } |
1789 | 1776 |
1790 } // namespace content | 1777 } // namespace content |
OLD | NEW |