Update V8 to version 3.30.4 (based on bleeding_edge revision r24443)
[chromium-blink-merge.git] / components / copresence / public / copresence_manager.h
blobae7f14cc98bed528fd5fad876e53ac455e0a72af
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.
5 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_
6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "components/copresence/public/copresence_delegate.h"
11 namespace copresence {
13 class ReportRequest;
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() {}
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;
33 // Factory method for CopresenceManagers. The delegate is owned
34 // by the caller, and must outlive the manager.
35 static scoped_ptr<CopresenceManager> Create(CopresenceDelegate* delegate);
37 private:
39 DISALLOW_COPY_AND_ASSIGN(CopresenceManager);
42 } // namespace copresence
44 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_MANAGER_H_