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

Side by Side Diff: content/browser/permissions/permission_service_context.cc

Issue 1316863010: browser: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request-multiple-content
Patch Set: Rebase on master Created 5 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/permissions/permission_service_context.h" 5 #include "content/browser/permissions/permission_service_context.h"
6 6
7 #include "content/browser/permissions/permission_service_impl.h" 7 #include "content/browser/permissions/permission_service_impl.h"
8 #include "content/public/browser/navigation_details.h" 8 #include "content/public/browser/navigation_details.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 23 matching lines...) Expand all
34 services_.push_back(new PermissionServiceImpl(this, request.Pass())); 34 services_.push_back(new PermissionServiceImpl(this, request.Pass()));
35 } 35 }
36 36
37 void PermissionServiceContext::ServiceHadConnectionError( 37 void PermissionServiceContext::ServiceHadConnectionError(
38 PermissionServiceImpl* service) { 38 PermissionServiceImpl* service) {
39 auto it = std::find(services_.begin(), services_.end(), service); 39 auto it = std::find(services_.begin(), services_.end(), service);
40 DCHECK(it != services_.end()); 40 DCHECK(it != services_.end());
41 services_.erase(it); 41 services_.erase(it);
42 } 42 }
43 43
44 void PermissionServiceContext::RenderFrameDeleted(
45 RenderFrameHost* render_frame_host) {
46 CancelPendingOperations(render_frame_host);
47 }
48
49 void PermissionServiceContext::RenderFrameHostChanged( 44 void PermissionServiceContext::RenderFrameHostChanged(
50 RenderFrameHost* old_host, 45 RenderFrameHost* old_host,
51 RenderFrameHost* new_host) { 46 RenderFrameHost* new_host) {
52 CancelPendingOperations(old_host); 47 CancelPendingOperations(old_host);
53 } 48 }
54 49
50 void PermissionServiceContext::FrameDeleted(
51 RenderFrameHost* render_frame_host) {
52 CancelPendingOperations(render_frame_host);
53 }
54
55 void PermissionServiceContext::DidNavigateAnyFrame( 55 void PermissionServiceContext::DidNavigateAnyFrame(
56 RenderFrameHost* render_frame_host, 56 RenderFrameHost* render_frame_host,
57 const LoadCommittedDetails& details, 57 const LoadCommittedDetails& details,
58 const FrameNavigateParams& params) { 58 const FrameNavigateParams& params) {
59 if (details.is_in_page) 59 if (details.is_in_page)
60 return; 60 return;
61 61
62 CancelPendingOperations(render_frame_host); 62 CancelPendingOperations(render_frame_host);
63 } 63 }
64 64
(...skipping 18 matching lines...) Expand all
83 GURL PermissionServiceContext::GetEmbeddingOrigin() const { 83 GURL PermissionServiceContext::GetEmbeddingOrigin() const {
84 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin() 84 return web_contents() ? web_contents()->GetLastCommittedURL().GetOrigin()
85 : GURL(); 85 : GURL();
86 } 86 }
87 87
88 RenderFrameHost* PermissionServiceContext::render_frame_host() const { 88 RenderFrameHost* PermissionServiceContext::render_frame_host() const {
89 return render_frame_host_; 89 return render_frame_host_;
90 } 90 }
91 91
92 } // namespace content 92 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/permissions/permission_service_context.h ('k') | content/browser/permissions/permission_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698