| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEB_INTENT_CALLBACKS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_ |
| 7 | 7 |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "chrome/browser/profiles/profile_keyed_service.h" | 9 #include "chrome/browser/profiles/profile_keyed_service.h" |
| 10 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 10 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 virtual ~Factory(); | 61 virtual ~Factory(); |
| 62 | 62 |
| 63 // ProfileKeyedServiceFactory | 63 // ProfileKeyedServiceFactory |
| 64 virtual ProfileKeyedService* BuildServiceInstanceFor( | 64 virtual ProfileKeyedService* BuildServiceInstanceFor( |
| 65 Profile* profile) const OVERRIDE; | 65 Profile* profile) const OVERRIDE; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Private method to get and clear the dispatcher for the given string key. | 68 // Private method to get and clear the dispatcher for the given string key. |
| 69 // If there is no dispatcher available, this will return NULL. Otherwise, this | 69 // If there is no dispatcher available, this will return NULL. Otherwise, this |
| 70 // transfers ownership of the WebIntentsDispatcher to the caller. | 70 // transfers ownership of the WebIntentsDispatcher to the caller. |
| 71 content::WebIntentsDispatcher* GetAndClear(std::string key); | 71 content::WebIntentsDispatcher* GetAndClear(const std::string& key); |
| 72 | 72 |
| 73 class SourceObserver; | 73 class SourceObserver; |
| 74 | 74 |
| 75 // Used as an incrementing ID for callback keys. | 75 // Used as an incrementing ID for callback keys. |
| 76 int last_id_; | 76 int last_id_; |
| 77 | 77 |
| 78 // Stores all pending callbacks sent to platform apps. | 78 // Stores all pending callbacks sent to platform apps. |
| 79 CallbackMap pending_; | 79 CallbackMap pending_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace extensions | 82 } // namespace extensions |
| 83 | 83 |
| 84 #endif // CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_ |
| OLD | NEW |