| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ | 
| 6 #define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ | 6 #define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ | 
| 7 | 7 | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 #include <set> | 9 #include <set> | 
| 10 #include <utility> | 10 #include <utility> | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 28   ~WakeLockServiceContext() override; | 28   ~WakeLockServiceContext() override; | 
| 29 | 29 | 
| 30   // Creates a WakeLockServiceImpl that is strongly bound to |request|. | 30   // Creates a WakeLockServiceImpl that is strongly bound to |request|. | 
| 31   void CreateService( | 31   void CreateService( | 
| 32       int render_process_id, | 32       int render_process_id, | 
| 33       int render_frame_id, | 33       int render_frame_id, | 
| 34       mojo::InterfaceRequest<blink::mojom::WakeLockService> request); | 34       mojo::InterfaceRequest<blink::mojom::WakeLockService> request); | 
| 35 | 35 | 
| 36   // WebContentsObserver implementation. | 36   // WebContentsObserver implementation. | 
| 37   void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | 37   void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | 
|  | 38   void WebContentsDestroyed() override; | 
| 38 | 39 | 
| 39   // Requests wake lock for RenderFrame identified by |render_process_id| and | 40   // Requests wake lock for RenderFrame identified by |render_process_id| and | 
| 40   // |render_frame_id|. | 41   // |render_frame_id|. | 
| 41   void RequestWakeLock(int render_process_id, int render_frame_id); | 42   void RequestWakeLock(int render_process_id, int render_frame_id); | 
| 42 | 43 | 
| 43   // Cancels wake lock request for RenderFrame identified by | 44   // Cancels wake lock request for RenderFrame identified by | 
| 44   // |render_process_id| and |render_frame_id|. | 45   // |render_process_id| and |render_frame_id|. | 
| 45   void CancelWakeLock(int render_process_id, int render_frame_id); | 46   void CancelWakeLock(int render_process_id, int render_frame_id); | 
| 46 | 47 | 
| 47   // Used by tests. | 48   // Used by tests. | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 60   std::unique_ptr<PowerSaveBlocker> wake_lock_; | 61   std::unique_ptr<PowerSaveBlocker> wake_lock_; | 
| 61 | 62 | 
| 62   base::WeakPtrFactory<WakeLockServiceContext> weak_factory_; | 63   base::WeakPtrFactory<WakeLockServiceContext> weak_factory_; | 
| 63 | 64 | 
| 64   DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext); | 65   DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext); | 
| 65 }; | 66 }; | 
| 66 | 67 | 
| 67 }  // namespace content | 68 }  // namespace content | 
| 68 | 69 | 
| 69 #endif  // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ | 70 #endif  // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ | 
| OLD | NEW | 
|---|