Chromium Code Reviews| 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. | |
|
nasko
2014/11/13 23:57:37
Since this class has a member pointer to RenderFra
mlamouri (slow - plz ping)
2014/11/14 00:16:33
There is one per RFH. Created when the RFH is crea
| |
| 18 class PermissionServiceContext : public WebContentsObserver { | |
| 19 public: | |
| 20 explicit PermissionServiceContext(RenderFrameHost* render_frame_host); | |
| 21 virtual ~PermissionServiceContext(); | |
| 22 | |
| 23 // WebContentsObserver | |
| 24 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | |
| 25 void DidNavigateAnyFrame(RenderFrameHost* render_frame_host, | |
| 26 const LoadCommittedDetails& details, | |
| 27 const FrameNavigateParams& params) override; | |
| 28 | |
| 29 RenderFrameHost* render_frame_host(); | |
| 30 | |
| 31 void set_service(PermissionServiceImpl* service); | |
| 32 | |
| 33 private: | |
| 34 RenderFrameHost* render_frame_host_; | |
| 35 PermissionServiceImpl* service_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(PermissionServiceContext); | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_CONTEXT_H_ | |
| OLD | NEW |