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

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

Issue 722153003: Implement basic mojo Permission service and use it for Geolocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/macros.h"
6 #include "content/public/browser/web_contents_observer.h"
7
8 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
9 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
10
11 namespace content {
12
13 class PermissionServiceImpl;
14 class RenderFrameHost;
15
16 // Provides information to a PermissionService. It is used by the
17 // PermissionService to handle request permission UI.
18 // The RenderFrameHost creates an instance when setting up the Permission mojo
19 // service and then passes ownership to the service.
20 class PermissionServiceContext : public WebContentsObserver {
21 public:
22 explicit PermissionServiceContext(RenderFrameHost* render_frame_host);
23 virtual ~PermissionServiceContext();
24
25 // WebContentsObserver
26 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
27 void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
28 const LoadCommittedDetails& details,
29 const FrameNavigateParams& params) override;
30
31 RenderFrameHost* render_frame_host();
32
33 void set_service(PermissionServiceImpl* service);
qsr 2014/11/14 09:20:26 This seems weird. There is a single context for mu
mlamouri (slow - plz ping) 2014/11/14 11:37:11 That's not the model I had in mind. Contrary to th
34
35 private:
36 RenderFrameHost* render_frame_host_;
37 PermissionServiceImpl* service_;
38
39 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext);
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698