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

Side by Side Diff: components/copresence/public/copresence_manager.h

Issue 441103002: Tests for the Copresence API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api
Patch Set: Fixing tests Created 6 years, 4 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
(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 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_
6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "components/copresence/public/copresence_manager_delegate.h"
10
11 namespace copresence {
12
13 class ReportRequest;
14
15 // The CopresenceManager class is the central interface for Copresence
16 // functionality. This class handles all the initialization and delegation
17 // of copresence tasks. Any user of copresence only needs to interact
18 // with this class.
19 class CopresenceManager {
20 public:
21 CopresenceManager() {}
22 virtual ~CopresenceManager() {}
23
24 // This method will execute a report request. Each report request can have
25 // multiple (un)publishes, (un)subscribes. This will ensure that once the
26 // manager is initialized, it sends all request to the server and handles
27 // the response. If an error is encountered, the status callback is used
28 // to relay it to the requester.
29 virtual void ExecuteReportRequest(ReportRequest request,
30 const std::string& app_id,
31 const StatusCallback& callback) = 0;
32
33 // Factory method for CopresenceManagers. The delegate is owned
34 // by the caller, and must outlive the manager.
35 static scoped_ptr<CopresenceManager> Create(
36 CopresenceManagerDelegate* delegate);
37
38 private:
39
40 DISALLOW_COPY_AND_ASSIGN(CopresenceManager);
41 };
42
43 } // namespace copresence
44
45 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698