Update V8 to version 3.30.4 (based on bleeding_edge revision r24443)
[chromium-blink-merge.git] / components / copresence / public / copresence_delegate.h
blob0b83087c201b4c703c2e689cd292b7d8a01da775
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_DELEGATE_H_
6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_
8 #include <string>
9 #include <vector>
11 #include "base/callback_forward.h"
13 namespace net {
14 class URLRequestContextGetter;
17 namespace copresence {
19 class Message;
20 class WhispernetClient;
22 enum CopresenceStatus { SUCCESS, FAIL };
24 // Callback type to send a status.
25 typedef base::Callback<void(CopresenceStatus)> StatusCallback;
27 // A delegate interface for users of Copresence.
28 class CopresenceDelegate {
29 public:
30 // This method will be called when we have subscribed messages that need to
31 // be sent to their respective apps.
32 virtual void HandleMessages(
33 const std::string& app_id,
34 const std::string& subscription_id,
35 const std::vector<Message>& message) = 0;
37 virtual net::URLRequestContextGetter* GetRequestContext() const = 0;
39 virtual const std::string GetPlatformVersionString() const = 0;
41 virtual const std::string GetAPIKey() const = 0;
43 virtual WhispernetClient* GetWhispernetClient() = 0;
46 } // namespace copresence
48 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_