Home | History | Annotate | Download | only in activity
      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 "athena/activity/public/activity_factory.h"
      6 
      7 #include "base/logging.h"
      8 
      9 namespace athena {
     10 
     11 namespace {
     12 
     13 ActivityFactory* instance = NULL;
     14 
     15 }
     16 
     17 // static
     18 void ActivityFactory::RegisterActivityFactory(ActivityFactory* factory) {
     19   DCHECK(!instance);
     20   instance = factory;
     21 }
     22 
     23 // static
     24 ActivityFactory* ActivityFactory::Get() {
     25   DCHECK(instance);
     26   return instance;
     27 }
     28 
     29 // static
     30 void ActivityFactory::Shutdown() {
     31   DCHECK(instance);
     32   delete instance;
     33   instance = NULL;
     34 }
     35 
     36 }  // namespace athena
     37