OLD | NEW |
---|---|
(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_ | |
OLD | NEW |