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 #include "chrome/browser/extensions/extension_test_message_listener.h" | 5 #include "chrome/browser/extensions/extension_test_message_listener.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "chrome/browser/extensions/api/test/test_api.h" | 8 #include "chrome/browser/extensions/api/test/test_api.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 function_ = content::Source<extensions::TestSendMessageFunction>( | 56 function_ = content::Source<extensions::TestSendMessageFunction>( |
57 source).ptr(); | 57 source).ptr(); |
58 satisfied_ = true; | 58 satisfied_ = true; |
59 registrar_.RemoveAll(); // Stop listening for more messages. | 59 registrar_.RemoveAll(); // Stop listening for more messages. |
60 if (!will_reply_) { | 60 if (!will_reply_) { |
61 function_->Reply(std::string()); | 61 function_->Reply(std::string()); |
62 function_ = NULL; | 62 function_ = NULL; |
63 } | 63 } |
64 if (waiting_) { | 64 if (waiting_) { |
65 waiting_ = false; | 65 waiting_ = false; |
66 MessageLoopForUI::current()->Quit(); | 66 base::MessageLoopForUI::current()->Quit(); |
67 } | 67 } |
68 } | 68 } |
69 } | 69 } |
OLD | NEW |