| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual void OnConnectComplete(int result_code); | 53 virtual void OnConnectComplete(int result_code); |
| 54 | 54 |
| 55 // Takes ownership of data. | 55 // Takes ownership of data. |
| 56 virtual void OnDataRead(int result_code, | 56 virtual void OnDataRead(int result_code, |
| 57 base::ListValue* data, | 57 base::ListValue* data, |
| 58 const std::string& address, | 58 const std::string& address, |
| 59 int port); | 59 int port); |
| 60 | 60 |
| 61 virtual void OnWriteComplete(int result_code); | 61 virtual void OnWriteComplete(int result_code); |
| 62 | 62 |
| 63 virtual void OnTransferComplete(int result_code, base::ListValue* data); | 63 virtual void OnTransferComplete(int result_code, base::BinaryValue* data); |
| 64 | 64 |
| 65 static std::string APIResourceEventTypeToString( | 65 static std::string APIResourceEventTypeToString( |
| 66 APIResourceEventType event_type); | 66 APIResourceEventType event_type); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 friend class base::RefCountedThreadSafe<APIResourceEventNotifier>; | 69 friend class base::RefCountedThreadSafe<APIResourceEventNotifier>; |
| 70 friend class MockAPIResourceEventNotifier; | 70 friend class MockAPIResourceEventNotifier; |
| 71 | 71 |
| 72 virtual ~APIResourceEventNotifier(); | 72 virtual ~APIResourceEventNotifier(); |
| 73 | 73 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 85 std::string src_extension_id_; | 85 std::string src_extension_id_; |
| 86 int src_id_; | 86 int src_id_; |
| 87 GURL src_url_; | 87 GURL src_url_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(APIResourceEventNotifier); | 89 DISALLOW_COPY_AND_ASSIGN(APIResourceEventNotifier); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace extensions | 92 } // namespace extensions |
| 93 | 93 |
| 94 #endif // CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ | 94 #endif // CHROME_BROWSER_EXTENSIONS_API_API_RESOURCE_EVENT_NOTIFIER_H_ |
| OLD | NEW |