OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1568 | 1568 |
1569 #if defined(ENABLE_WEBVR) | 1569 #if defined(ENABLE_WEBVR) |
1570 const base::CommandLine& browser_command_line = | 1570 const base::CommandLine& browser_command_line = |
1571 *base::CommandLine::ForCurrentProcess(); | 1571 *base::CommandLine::ForCurrentProcess(); |
1572 | 1572 |
1573 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1573 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
1574 GetServiceRegistry()->AddService<VRService>( | 1574 GetServiceRegistry()->AddService<VRService>( |
1575 base::Bind(&VRDeviceManager::BindRequest)); | 1575 base::Bind(&VRDeviceManager::BindRequest)); |
1576 } | 1576 } |
1577 #endif | 1577 #endif |
1578 | |
1579 GetContentClient()->browser()->OverrideRenderFrameMojoServices( | |
Ken Rockot(use gerrit already)
2015/07/06 18:58:00
So how does this get called now?
xhwang
2015/07/07 19:21:04
This call is renamed to OverrideFrameMojoShellServ
| |
1580 GetServiceRegistry(), this); | |
1581 } | 1578 } |
1582 | 1579 |
1583 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { | 1580 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { |
1584 // Only main frames should be swapped out and retained inside a proxy host. | 1581 // Only main frames should be swapped out and retained inside a proxy host. |
1585 if (rfh_state == STATE_SWAPPED_OUT) | 1582 if (rfh_state == STATE_SWAPPED_OUT) |
1586 CHECK(!GetParent()); | 1583 CHECK(!GetParent()); |
1587 | 1584 |
1588 // We update the number of RenderFrameHosts in a SiteInstance when the swapped | 1585 // We update the number of RenderFrameHosts in a SiteInstance when the swapped |
1589 // out status of a RenderFrameHost gets flipped to/from active. | 1586 // out status of a RenderFrameHost gets flipped to/from active. |
1590 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state)) | 1587 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state)) |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2098 // We may be returning to an existing NavigationEntry that had been granted | 2095 // We may be returning to an existing NavigationEntry that had been granted |
2099 // file access. If this is a different process, we will need to grant the | 2096 // file access. If this is a different process, we will need to grant the |
2100 // access again. The files listed in the page state are validated when they | 2097 // access again. The files listed in the page state are validated when they |
2101 // are received from the renderer to prevent abuse. | 2098 // are received from the renderer to prevent abuse. |
2102 if (request_params.page_state.IsValid()) { | 2099 if (request_params.page_state.IsValid()) { |
2103 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2100 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
2104 } | 2101 } |
2105 } | 2102 } |
2106 | 2103 |
2107 } // namespace content | 2104 } // namespace content |
OLD | NEW |