| 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_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include "base/memory/linked_ptr.h" | 8 #include "base/memory/linked_ptr.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 explicit GcdPrivateAPI(content::BrowserContext* context); | 32 explicit GcdPrivateAPI(content::BrowserContext* context); |
| 33 virtual ~GcdPrivateAPI(); | 33 virtual ~GcdPrivateAPI(); |
| 34 | 34 |
| 35 static void SetGCDApiFlowFactoryForTests(GCDApiFlowFactoryForTests* factory); | 35 static void SetGCDApiFlowFactoryForTests(GCDApiFlowFactoryForTests* factory); |
| 36 | 36 |
| 37 // BrowserContextKeyedAPI implementation. | 37 // BrowserContextKeyedAPI implementation. |
| 38 static BrowserContextKeyedAPIFactory<GcdPrivateAPI>* GetFactoryInstance(); | 38 static BrowserContextKeyedAPIFactory<GcdPrivateAPI>* GetFactoryInstance(); |
| 39 | 39 |
| 40 bool QueryForDevices(); |
| 41 |
| 40 private: | 42 private: |
| 41 friend class BrowserContextKeyedAPIFactory<GcdPrivateAPI>; | 43 friend class BrowserContextKeyedAPIFactory<GcdPrivateAPI>; |
| 42 | 44 |
| 43 typedef std::map<std::string /* id_string */, | 45 typedef std::map<std::string /* id_string */, |
| 44 linked_ptr<api::gcd_private::GCDDevice> > GCDDeviceMap; | 46 linked_ptr<api::gcd_private::GCDDevice> > GCDDeviceMap; |
| 45 | 47 |
| 46 // EventRouter::Observer implementation. | 48 // EventRouter::Observer implementation. |
| 47 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; | 49 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; |
| 48 virtual void OnListenerRemoved(const EventListenerInfo& details) OVERRIDE; | 50 virtual void OnListenerRemoved(const EventListenerInfo& details) OVERRIDE; |
| 49 | 51 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 268 |
| 267 // AsyncExtensionFunction overrides. | 269 // AsyncExtensionFunction overrides. |
| 268 virtual bool RunAsync() OVERRIDE; | 270 virtual bool RunAsync() OVERRIDE; |
| 269 | 271 |
| 270 private: | 272 private: |
| 271 }; | 273 }; |
| 272 | 274 |
| 273 } // namespace extensions | 275 } // namespace extensions |
| 274 | 276 |
| 275 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 277 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
| OLD | NEW |