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

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

Issue 1158813002: Use RenderFrameHost for ::RequestPermission() and ::CancelPermission(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fixes Created 5 years, 6 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 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
(...skipping 18 matching lines...) Expand all
29 29
30 void CreateService(mojo::InterfaceRequest<PermissionService> request); 30 void CreateService(mojo::InterfaceRequest<PermissionService> request);
31 31
32 // Called by a PermissionService identified as |service| when it has a 32 // Called by a PermissionService identified as |service| when it has a
33 // connection error in order to get unregistered and killed. 33 // connection error in order to get unregistered and killed.
34 void ServiceHadConnectionError(PermissionServiceImpl* service); 34 void ServiceHadConnectionError(PermissionServiceImpl* service);
35 35
36 BrowserContext* GetBrowserContext() const; 36 BrowserContext* GetBrowserContext() const;
37 GURL GetEmbeddingOrigin() const; 37 GURL GetEmbeddingOrigin() const;
38 38
39 RenderFrameHost* render_frame_host() const;
40
39 private: 41 private:
40 // WebContentsObserver 42 // WebContentsObserver
41 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; 43 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
42 void DidNavigateAnyFrame(RenderFrameHost* render_frame_host, 44 void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
43 const LoadCommittedDetails& details, 45 const LoadCommittedDetails& details,
44 const FrameNavigateParams& params) override; 46 const FrameNavigateParams& params) override;
45 47
46 void CancelPendingOperations(RenderFrameHost*) const; 48 void CancelPendingOperations(RenderFrameHost*) const;
47 49
48 RenderFrameHost* render_frame_host_; 50 RenderFrameHost* render_frame_host_;
49 RenderProcessHost* render_process_host_; 51 RenderProcessHost* render_process_host_;
50 ScopedVector<PermissionServiceImpl> services_; 52 ScopedVector<PermissionServiceImpl> services_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext); 54 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext);
53 }; 55 };
54 56
55 } // namespace content 57 } // namespace content
56 58
57 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ 59 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698