forked from googlearchive/ADBPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Factory.cpp
33 lines (27 loc) · 775 Bytes
/
Factory.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "FactoryBase.h"
#include "ADBPlugin.h"
#include <boost/make_shared.hpp>
class PluginFactory : public FB::FactoryBase
{
public:
FB::PluginCorePtr createPlugin(const std::string& mimetype)
{
return boost::make_shared<ADBPlugin>();
}
void globalPluginInitialize()
{
ADBPlugin::StaticInitialize();
}
void globalPluginDeinitialize()
{
ADBPlugin::StaticDeinitialize();
}
};
FB::FactoryBasePtr getFactoryInstance()
{
static boost::shared_ptr<PluginFactory> factory = boost::make_shared<PluginFactory>();
return factory;
}