| 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_API_API_RESOURCE_EVENT_NOTIFIER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 ApiResourceEventType event_type); | 40 ApiResourceEventType event_type); |
| 41 | 41 |
| 42 const std::string& src_extension_id() const { return src_extension_id_; } | 42 const std::string& src_extension_id() const { return src_extension_id_; } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 friend class base::RefCountedThreadSafe<ApiResourceEventNotifier>; | 45 friend class base::RefCountedThreadSafe<ApiResourceEventNotifier>; |
| 46 friend class MockApiResourceEventNotifier; | 46 friend class MockApiResourceEventNotifier; |
| 47 | 47 |
| 48 virtual ~ApiResourceEventNotifier(); | 48 virtual ~ApiResourceEventNotifier(); |
| 49 | 49 |
| 50 void DispatchEvent(const std::string &extension, DictionaryValue* event); | 50 void DispatchEvent(const std::string& event_name, DictionaryValue* args); |
| 51 void DispatchEventOnUIThread(const std::string& extension, | 51 void DispatchEventOnUIThread(const std::string& event_name, |
| 52 DictionaryValue* event); | 52 DictionaryValue* args); |
| 53 DictionaryValue* CreateApiResourceEvent(ApiResourceEventType event_type); | 53 DictionaryValue* CreateApiResourceEvent(ApiResourceEventType event_type); |
| 54 | 54 |
| 55 EventRouter* router_; | 55 EventRouter* router_; |
| 56 Profile* profile_; | 56 Profile* profile_; |
| 57 std::string src_extension_id_; | 57 std::string src_extension_id_; |
| 58 int src_id_; | 58 int src_id_; |
| 59 GURL src_url_; | 59 GURL src_url_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(ApiResourceEventNotifier); | 61 DISALLOW_COPY_AND_ASSIGN(ApiResourceEventNotifier); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace extensions | 64 } // namespace extensions |
| 65 | 65 |
| 66 #endif // CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ | 66 #endif // CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ |
| OLD | NEW |