| OLD | NEW |
| 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 #include "athena/content/public/app_registry.h" | 5 #include "athena/content/public/app_registry.h" |
| 6 | 6 |
| 7 #include "athena/content/app_activity_registry.h" | 7 #include "athena/content/app_activity_registry.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 namespace athena { | 10 namespace athena { |
| 11 | 11 |
| 12 class AppRegistryImpl : public AppRegistry { | 12 class AppRegistryImpl : public AppRegistry { |
| 13 public: | 13 public: |
| 14 AppRegistryImpl(); | 14 AppRegistryImpl(); |
| 15 virtual ~AppRegistryImpl(); | 15 virtual ~AppRegistryImpl(); |
| 16 | 16 |
| 17 // AppRegistry: | 17 // AppRegistry: |
| 18 virtual AppActivityRegistry* GetAppActivityRegistry( | 18 virtual AppActivityRegistry* GetAppActivityRegistry( |
| 19 const std::string& app_id, | 19 const std::string& app_id, |
| 20 content::BrowserContext* browser_context) OVERRIDE; | 20 content::BrowserContext* browser_context) override; |
| 21 virtual int NumberOfApplications() const OVERRIDE { return app_list_.size(); } | 21 virtual int NumberOfApplications() const override { return app_list_.size(); } |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 virtual void RemoveAppActivityRegistry( | 24 virtual void RemoveAppActivityRegistry( |
| 25 AppActivityRegistry* registry) OVERRIDE; | 25 AppActivityRegistry* registry) override; |
| 26 | 26 |
| 27 std::vector<AppActivityRegistry*> app_list_; | 27 std::vector<AppActivityRegistry*> app_list_; |
| 28 | 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(AppRegistryImpl); | 29 DISALLOW_COPY_AND_ASSIGN(AppRegistryImpl); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 AppRegistryImpl* instance = NULL; | 34 AppRegistryImpl* instance = NULL; |
| 35 | 35 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 delete instance; | 85 delete instance; |
| 86 } | 86 } |
| 87 | 87 |
| 88 AppRegistry::AppRegistry() {} | 88 AppRegistry::AppRegistry() {} |
| 89 | 89 |
| 90 AppRegistry::~AppRegistry() { | 90 AppRegistry::~AppRegistry() { |
| 91 instance = NULL; | 91 instance = NULL; |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace athena | 94 } // namespace athena |
| OLD | NEW |