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

Side by Side Diff: content/browser/wake_lock/wake_lock_service_context.h

Issue 1794553002: [Playground] Onion Soup: moving ScreenWakeLock to Blink modules/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit DEPS Created 4 years, 8 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 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 <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 10 matching lines...) Expand all
21 class PowerSaveBlocker; 21 class PowerSaveBlocker;
22 class RenderFrameHost; 22 class RenderFrameHost;
23 class WebContents; 23 class WebContents;
24 24
25 class CONTENT_EXPORT WakeLockServiceContext : public WebContentsObserver { 25 class CONTENT_EXPORT WakeLockServiceContext : public WebContentsObserver {
26 public: 26 public:
27 explicit WakeLockServiceContext(WebContents* web_contents); 27 explicit WakeLockServiceContext(WebContents* web_contents);
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(int render_process_id, 31 void CreateService(
32 int render_frame_id, 32 int render_process_id,
33 mojo::InterfaceRequest<mojom::WakeLockService> request); 33 int render_frame_id,
34 mojo::InterfaceRequest<blink::mojom::WakeLockService> request);
34 35
35 // WebContentsObserver implementation. 36 // WebContentsObserver implementation.
36 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; 37 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
37 38
38 // Requests wake lock for RenderFrame identified by |render_process_id| and 39 // Requests wake lock for RenderFrame identified by |render_process_id| and
39 // |render_frame_id|. 40 // |render_frame_id|.
40 void RequestWakeLock(int render_process_id, int render_frame_id); 41 void RequestWakeLock(int render_process_id, int render_frame_id);
41 42
42 // Cancels wake lock request for RenderFrame identified by 43 // Cancels wake lock request for RenderFrame identified by
43 // |render_process_id| and |render_frame_id|. 44 // |render_process_id| and |render_frame_id|.
(...skipping 15 matching lines...) Expand all
59 scoped_ptr<PowerSaveBlocker> wake_lock_; 60 scoped_ptr<PowerSaveBlocker> wake_lock_;
60 61
61 base::WeakPtrFactory<WakeLockServiceContext> weak_factory_; 62 base::WeakPtrFactory<WakeLockServiceContext> weak_factory_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext); 64 DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext);
64 }; 65 };
65 66
66 } // namespace content 67 } // namespace content
67 68
68 #endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ 69 #endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/wake_lock/wake_lock_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698