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

Side by Side Diff: extensions/browser/api/copresence_endpoints/copresence_endpoint_resource.cc

Issue 895783002: Remove the Copresence Endpoints API. (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
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 #include "extensions/browser/api/copresence_endpoints/copresence_endpoint_resour ce.h"
6
7 #include "base/lazy_instance.h"
8 #include "components/copresence_endpoints/public/copresence_endpoint.h"
9 #include "content/public/browser/browser_context.h"
10
11 using copresence_endpoints::CopresenceEndpoint;
12
13 namespace extensions {
14
15 // CopresenceEndpointResource.
16
17 // static
18 static base::LazyInstance<BrowserContextKeyedAPIFactory<
19 ApiResourceManager<CopresenceEndpointResource>>> g_endpoint_factory =
20 LAZY_INSTANCE_INITIALIZER;
21
22 // static
23 template <>
24 BrowserContextKeyedAPIFactory<ApiResourceManager<CopresenceEndpointResource>>*
25 ApiResourceManager<CopresenceEndpointResource>::GetFactoryInstance() {
26 return g_endpoint_factory.Pointer();
27 }
28
29 CopresenceEndpointResource::CopresenceEndpointResource(
30 const std::string& owner_extension_id,
31 scoped_ptr<copresence_endpoints::CopresenceEndpoint> endpoint)
32 : ApiResource(owner_extension_id), endpoint_(endpoint.Pass()) {
33 }
34
35 CopresenceEndpointResource::~CopresenceEndpointResource() {
36 }
37
38 copresence_endpoints::CopresenceEndpoint*
39 CopresenceEndpointResource::endpoint() {
40 return endpoint_.get();
41 }
42
43 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698