| 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/scoped_observer.h" | 14 #include "base/scoped_observer.h" |
| 15 #include "components/gcm_driver/common/gcm_messages.h" | 15 #include "components/gcm_driver/common/gcm_messages.h" |
| 16 #include "components/gcm_driver/gcm_app_handler.h" | 16 #include "components/gcm_driver/gcm_app_handler.h" |
| 17 #include "components/gcm_driver/gcm_client.h" | 17 #include "components/gcm_driver/gcm_client.h" |
| 18 #include "components/gcm_driver/instance_id/instance_id.h" | 18 #include "components/gcm_driver/instance_id/instance_id.h" |
| 19 #include "extensions/browser/browser_context_keyed_api_factory.h" | 19 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 20 #include "extensions/browser/extension_registry_observer.h" | 20 #include "extensions/browser/extension_registry_observer.h" |
| 21 | 21 |
| 22 class Profile; | 22 class Profile; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // BrowserContextKeyedAPI implementation. | 93 // BrowserContextKeyedAPI implementation. |
| 94 static const char* service_name() { return "ExtensionGCMAppHandler"; } | 94 static const char* service_name() { return "ExtensionGCMAppHandler"; } |
| 95 static const bool kServiceIsNULLWhileTesting = true; | 95 static const bool kServiceIsNULLWhileTesting = true; |
| 96 | 96 |
| 97 Profile* profile_; | 97 Profile* profile_; |
| 98 | 98 |
| 99 // Listen to extension load, unloaded notifications. | 99 // Listen to extension load, unloaded notifications. |
| 100 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 100 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 101 extension_registry_observer_; | 101 extension_registry_observer_; |
| 102 | 102 |
| 103 scoped_ptr<extensions::GcmJsEventRouter> js_event_router_; | 103 std::unique_ptr<extensions::GcmJsEventRouter> js_event_router_; |
| 104 | 104 |
| 105 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; | 105 base::WeakPtrFactory<ExtensionGCMAppHandler> weak_factory_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); | 107 DISALLOW_COPY_AND_ASSIGN(ExtensionGCMAppHandler); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace extensions | 110 } // namespace extensions |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ | 112 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GCM_APP_HANDLER_H_ |
| OLD | NEW |