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

Side by Side Diff: device/wake_lock/wake_lock_service_context.h

Issue 2867303003: Generalize the API of WakeLockContext mojo interface. (Closed)
Patch Set: Generalize the API of WakeLockContext mojo interface. Created 3 years, 7 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 DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ 5 #ifndef DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
6 #define DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ 6 #define DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 13 matching lines...) Expand all
24 // Serves requests for WakeLockService connections within a given context. 24 // Serves requests for WakeLockService connections within a given context.
25 class WakeLockServiceContext : public mojom::WakeLockContext { 25 class WakeLockServiceContext : public mojom::WakeLockContext {
26 public: 26 public:
27 WakeLockServiceContext( 27 WakeLockServiceContext(
28 int context_id, 28 int context_id,
29 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, 29 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
30 const WakeLockContextCallback& native_view_getter); 30 const WakeLockContextCallback& native_view_getter);
31 ~WakeLockServiceContext() override; 31 ~WakeLockServiceContext() override;
32 32
33 // mojom::WakeLockContext: 33 // mojom::WakeLockContext:
34 void GetWakeLock(mojom::WakeLockServiceRequest request) override; 34 void GetWakeLock(mojom::WakeLockType type,
35 mojom::WakeLockReason reason,
36 const std::string& description,
37 mojom::WakeLockServiceRequest request) override;
35 38
36 private: 39 private:
37 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 40 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
38 int context_id_; 41 int context_id_;
39 WakeLockContextCallback native_view_getter_; 42 WakeLockContextCallback native_view_getter_;
40 43
41 DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext); 44 DISALLOW_COPY_AND_ASSIGN(WakeLockServiceContext);
42 }; 45 };
43 46
44 } // namespace device 47 } // namespace device
45 48
46 #endif // DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_ 49 #endif // DEVICE_WAKE_LOCK_WAKE_LOCK_SERVICE_CONTEXT_H_
OLDNEW
« no previous file with comments | « device/wake_lock/wake_lock_context_provider.cc ('k') | device/wake_lock/wake_lock_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698