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 EXTENSIONS_TEST_EXTENSION_TEST_MESSAGE_LISTENER_H_ | 5 #ifndef EXTENSIONS_TEST_EXTENSION_TEST_MESSAGE_LISTENER_H_ |
6 #define EXTENSIONS_TEST_EXTENSION_TEST_MESSAGE_LISTENER_H_ | 6 #define EXTENSIONS_TEST_EXTENSION_TEST_MESSAGE_LISTENER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void set_extension_id(const std::string& extension_id) { | 124 void set_extension_id(const std::string& extension_id) { |
125 extension_id_ = extension_id; | 125 extension_id_ = extension_id; |
126 } | 126 } |
127 | 127 |
128 const std::string& message() const { return message_; } | 128 const std::string& message() const { return message_; } |
129 | 129 |
130 private: | 130 private: |
131 // Implements the content::NotificationObserver interface. | 131 // Implements the content::NotificationObserver interface. |
132 virtual void Observe(int type, | 132 virtual void Observe(int type, |
133 const content::NotificationSource& source, | 133 const content::NotificationSource& source, |
134 const content::NotificationDetails& details) OVERRIDE; | 134 const content::NotificationDetails& details) override; |
135 | 135 |
136 content::NotificationRegistrar registrar_; | 136 content::NotificationRegistrar registrar_; |
137 | 137 |
138 // The message we're expecting. | 138 // The message we're expecting. |
139 std::string expected_message_; | 139 std::string expected_message_; |
140 | 140 |
141 // The last message we received. | 141 // The last message we received. |
142 std::string message_; | 142 std::string message_; |
143 | 143 |
144 // Whether we've seen expected_message_ yet. | 144 // Whether we've seen expected_message_ yet. |
(...skipping 20 matching lines...) Expand all Loading... |
165 std::string failure_message_; | 165 std::string failure_message_; |
166 | 166 |
167 // If we received a message that was the failure message. | 167 // If we received a message that was the failure message. |
168 bool failed_; | 168 bool failed_; |
169 | 169 |
170 // The function we need to reply to. | 170 // The function we need to reply to. |
171 scoped_refptr<extensions::TestSendMessageFunction> function_; | 171 scoped_refptr<extensions::TestSendMessageFunction> function_; |
172 }; | 172 }; |
173 | 173 |
174 #endif // EXTENSIONS_TEST_EXTENSION_TEST_MESSAGE_LISTENER_H_ | 174 #endif // EXTENSIONS_TEST_EXTENSION_TEST_MESSAGE_LISTENER_H_ |
OLD | NEW |