| 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 EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ | 6 #define EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ |
| 7 | 7 |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "extensions/browser/extension_function.h" | 9 #include "extensions/browser/extension_function.h" |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN) | 74 DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN) |
| 75 | 75 |
| 76 // Sends a reply back to the calling extension. Many extensions don't need | 76 // Sends a reply back to the calling extension. Many extensions don't need |
| 77 // a reply and will just ignore it. | 77 // a reply and will just ignore it. |
| 78 void Reply(const std::string& message); | 78 void Reply(const std::string& message); |
| 79 | 79 |
| 80 protected: | 80 protected: |
| 81 virtual ~TestSendMessageFunction(); | 81 virtual ~TestSendMessageFunction(); |
| 82 | 82 |
| 83 // ExtensionFunction: | 83 // ExtensionFunction: |
| 84 virtual bool RunImpl() OVERRIDE; | 84 virtual bool RunAsync() OVERRIDE; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class TestGetConfigFunction : public TestExtensionFunction { | 87 class TestGetConfigFunction : public TestExtensionFunction { |
| 88 public: | 88 public: |
| 89 DECLARE_EXTENSION_FUNCTION("test.getConfig", UNKNOWN) | 89 DECLARE_EXTENSION_FUNCTION("test.getConfig", UNKNOWN) |
| 90 | 90 |
| 91 // Set the dictionary returned by chrome.test.getConfig(). | 91 // Set the dictionary returned by chrome.test.getConfig(). |
| 92 // Does not take ownership of |value|. | 92 // Does not take ownership of |value|. |
| 93 static void set_test_config_state(base::DictionaryValue* value); | 93 static void set_test_config_state(base::DictionaryValue* value); |
| 94 | 94 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 protected: | 129 protected: |
| 130 virtual ~TestWaitForRoundTripFunction(); | 130 virtual ~TestWaitForRoundTripFunction(); |
| 131 | 131 |
| 132 // TestExtensionFunction: | 132 // TestExtensionFunction: |
| 133 virtual bool RunSafe() OVERRIDE; | 133 virtual bool RunSafe() OVERRIDE; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace extensions | 136 } // namespace extensions |
| 137 | 137 |
| 138 #endif // EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ | 138 #endif // EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ |
| OLD | NEW |