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

Side by Side Diff: chrome/browser/extensions/api/copresence/copresence_api.h

Issue 901213003: Removing the project ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/copresence/copresence_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 friend class BrowserContextKeyedAPIFactory<CopresenceService>; 79 friend class BrowserContextKeyedAPIFactory<CopresenceService>;
80 80
81 // CopresenceDelegate implementation 81 // CopresenceDelegate implementation
82 void HandleMessages(const std::string& app_id, 82 void HandleMessages(const std::string& app_id,
83 const std::string& subscription_id, 83 const std::string& subscription_id,
84 const std::vector<copresence::Message>& message) override; 84 const std::vector<copresence::Message>& message) override;
85 void HandleStatusUpdate(copresence::CopresenceStatus status) override; 85 void HandleStatusUpdate(copresence::CopresenceStatus status) override;
86 net::URLRequestContextGetter* GetRequestContext() const override; 86 net::URLRequestContextGetter* GetRequestContext() const override;
87 const std::string GetPlatformVersionString() const override; 87 const std::string GetPlatformVersionString() const override;
88 const std::string GetAPIKey(const std::string& app_id) const override; 88 const std::string GetAPIKey(const std::string& app_id) const override;
89 const std::string GetProjectId(const std::string& app_id) const override;
90 copresence::WhispernetClient* GetWhispernetClient() override; 89 copresence::WhispernetClient* GetWhispernetClient() override;
91 gcm::GCMDriver* GetGCMDriver() override; 90 gcm::GCMDriver* GetGCMDriver() override;
92 const std::string GetDeviceId(bool authenticated) override; 91 const std::string GetDeviceId(bool authenticated) override;
93 void SaveDeviceId(bool authenticated, const std::string& device_id) override; 92 void SaveDeviceId(bool authenticated, const std::string& device_id) override;
94 93
95 // BrowserContextKeyedAPI implementation. 94 // BrowserContextKeyedAPI implementation.
96 static const char* service_name() { return "CopresenceService"; } 95 static const char* service_name() { return "CopresenceService"; }
97 96
98 PrefService* GetPrefService(); 97 PrefService* GetPrefService();
99 98
(...skipping 20 matching lines...) Expand all
120 DECLARE_EXTENSION_FUNCTION("copresence.execute", COPRESENCE_EXECUTE); 119 DECLARE_EXTENSION_FUNCTION("copresence.execute", COPRESENCE_EXECUTE);
121 120
122 protected: 121 protected:
123 ~CopresenceExecuteFunction() override {} 122 ~CopresenceExecuteFunction() override {}
124 ExtensionFunction::ResponseAction Run() override; 123 ExtensionFunction::ResponseAction Run() override;
125 124
126 private: 125 private:
127 void SendResult(copresence::CopresenceStatus status); 126 void SendResult(copresence::CopresenceStatus status);
128 }; 127 };
129 128
129 // TODO(ckehoe): Remove this function.
130 class CopresenceSetApiKeyFunction : public ChromeUIThreadExtensionFunction { 130 class CopresenceSetApiKeyFunction : public ChromeUIThreadExtensionFunction {
131 public: 131 public:
132 DECLARE_EXTENSION_FUNCTION("copresence.setApiKey", COPRESENCE_SETAPIKEY); 132 DECLARE_EXTENSION_FUNCTION("copresence.setApiKey", COPRESENCE_SETAPIKEY);
133 133
134 protected: 134 protected:
135 ~CopresenceSetApiKeyFunction() override {} 135 ~CopresenceSetApiKeyFunction() override {}
136 ExtensionFunction::ResponseAction Run() override; 136 ExtensionFunction::ResponseAction Run() override;
137 }; 137 };
138 138
139 class CopresenceSetAuthTokenFunction : public ChromeUIThreadExtensionFunction { 139 class CopresenceSetAuthTokenFunction : public ChromeUIThreadExtensionFunction {
140 public: 140 public:
141 DECLARE_EXTENSION_FUNCTION("copresence.setAuthToken", 141 DECLARE_EXTENSION_FUNCTION("copresence.setAuthToken",
142 COPRESENCE_SETAUTHTOKEN); 142 COPRESENCE_SETAUTHTOKEN);
143 143
144 protected: 144 protected:
145 ~CopresenceSetAuthTokenFunction() override {} 145 ~CopresenceSetAuthTokenFunction() override {}
146 ExtensionFunction::ResponseAction Run() override; 146 ExtensionFunction::ResponseAction Run() override;
147 }; 147 };
148 148
149 } // namespace extensions 149 } // namespace extensions
150 150
151 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ 151 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/copresence/copresence_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698