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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1053773007: Add Platform Verification Mojo Services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 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
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 base::Unretained(permission_service_context_.get()))); 1563 base::Unretained(permission_service_context_.get())));
1564 1564
1565 GetServiceRegistry()->AddService<presentation::PresentationService>( 1565 GetServiceRegistry()->AddService<presentation::PresentationService>(
1566 base::Bind(&PresentationServiceImpl::CreateMojoService, 1566 base::Bind(&PresentationServiceImpl::CreateMojoService,
1567 base::Unretained(this))); 1567 base::Unretained(this)));
1568 1568
1569 #if defined(ENABLE_MEDIA_MOJO_RENDERER) 1569 #if defined(ENABLE_MEDIA_MOJO_RENDERER)
1570 GetServiceRegistry()->AddService<mojo::MediaRenderer>( 1570 GetServiceRegistry()->AddService<mojo::MediaRenderer>(
1571 base::Bind(&CreateMediaRendererService)); 1571 base::Bind(&CreateMediaRendererService));
1572 #endif 1572 #endif
1573
1574 GetContentClient()->browser()->OverrideRenderFrameMojoServices(
1575 GetServiceRegistry(), this);
1573 } 1576 }
1574 1577
1575 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { 1578 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) {
1576 // Only main frames should be swapped out and retained inside a proxy host. 1579 // Only main frames should be swapped out and retained inside a proxy host.
1577 if (rfh_state == STATE_SWAPPED_OUT) 1580 if (rfh_state == STATE_SWAPPED_OUT)
1578 CHECK(!GetParent()); 1581 CHECK(!GetParent());
1579 1582
1580 // We update the number of RenderFrameHosts in a SiteInstance when the swapped 1583 // We update the number of RenderFrameHosts in a SiteInstance when the swapped
1581 // out status of a RenderFrameHost gets flipped to/from active. 1584 // out status of a RenderFrameHost gets flipped to/from active.
1582 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state)) 1585 if (!IsRFHStateActive(rfh_state_) && IsRFHStateActive(rfh_state))
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 // We may be returning to an existing NavigationEntry that had been granted 2093 // We may be returning to an existing NavigationEntry that had been granted
2091 // file access. If this is a different process, we will need to grant the 2094 // file access. If this is a different process, we will need to grant the
2092 // access again. The files listed in the page state are validated when they 2095 // access again. The files listed in the page state are validated when they
2093 // are received from the renderer to prevent abuse. 2096 // are received from the renderer to prevent abuse.
2094 if (request_params.page_state.IsValid()) { 2097 if (request_params.page_state.IsValid()) {
2095 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); 2098 render_view_host_->GrantFileAccessFromPageState(request_params.page_state);
2096 } 2099 }
2097 } 2100 }
2098 2101
2099 } // namespace content 2102 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698