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 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 | 1622 |
1623 #if defined(ENABLE_WEBVR) | 1623 #if defined(ENABLE_WEBVR) |
1624 const base::CommandLine& browser_command_line = | 1624 const base::CommandLine& browser_command_line = |
1625 *base::CommandLine::ForCurrentProcess(); | 1625 *base::CommandLine::ForCurrentProcess(); |
1626 | 1626 |
1627 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1627 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
1628 GetServiceRegistry()->AddService<VRService>( | 1628 GetServiceRegistry()->AddService<VRService>( |
1629 base::Bind(&VRDeviceManager::BindRequest)); | 1629 base::Bind(&VRDeviceManager::BindRequest)); |
1630 } | 1630 } |
1631 #endif | 1631 #endif |
| 1632 |
| 1633 GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
| 1634 GetServiceRegistry(), this); |
1632 } | 1635 } |
1633 | 1636 |
1634 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { | 1637 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { |
1635 // Only main frames should be swapped out and retained inside a proxy host. | 1638 // Only main frames should be swapped out and retained inside a proxy host. |
1636 if (rfh_state == STATE_SWAPPED_OUT) | 1639 if (rfh_state == STATE_SWAPPED_OUT) |
1637 CHECK(!GetParent()); | 1640 CHECK(!GetParent()); |
1638 | 1641 |
1639 // We update the number of RenderFrameHosts in a SiteInstance when the swapped | 1642 // We update the number of RenderFrameHosts in a SiteInstance when the swapped |
1640 // out status of a RenderFrameHost gets flipped to/from active. | 1643 // out status of a RenderFrameHost gets flipped to/from active. |
1641 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state)) | 1644 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state)) |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2246 BrowserPluginInstanceIDToAXTreeID(value))); | 2249 BrowserPluginInstanceIDToAXTreeID(value))); |
2247 break; | 2250 break; |
2248 case AX_CONTENT_INT_ATTRIBUTE_LAST: | 2251 case AX_CONTENT_INT_ATTRIBUTE_LAST: |
2249 NOTREACHED(); | 2252 NOTREACHED(); |
2250 break; | 2253 break; |
2251 } | 2254 } |
2252 } | 2255 } |
2253 } | 2256 } |
2254 | 2257 |
2255 } // namespace content | 2258 } // namespace content |
OLD | NEW |