| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 public: | 51 public: |
| 52 DECLARE_EXTENSION_FUNCTION("test.log", UNKNOWN) | 52 DECLARE_EXTENSION_FUNCTION("test.log", UNKNOWN) |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 virtual ~TestLogFunction(); | 55 virtual ~TestLogFunction(); |
| 56 | 56 |
| 57 // TestExtensionFunction: | 57 // TestExtensionFunction: |
| 58 virtual bool RunSafe() OVERRIDE; | 58 virtual bool RunSafe() OVERRIDE; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 class TestResetQuotaFunction : public TestExtensionFunction { | |
| 62 public: | |
| 63 DECLARE_EXTENSION_FUNCTION("test.resetQuota", UNKNOWN) | |
| 64 | |
| 65 protected: | |
| 66 virtual ~TestResetQuotaFunction(); | |
| 67 | |
| 68 // TestExtensionFunction: | |
| 69 virtual bool RunSafe() OVERRIDE; | |
| 70 }; | |
| 71 | |
| 72 class TestSendMessageFunction : public AsyncExtensionFunction { | 61 class TestSendMessageFunction : public AsyncExtensionFunction { |
| 73 public: | 62 public: |
| 74 DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN) | 63 DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN) |
| 75 | 64 |
| 76 // Sends a reply back to the calling extension. Many extensions don't need | 65 // Sends a reply back to the calling extension. Many extensions don't need |
| 77 // a reply and will just ignore it. | 66 // a reply and will just ignore it. |
| 78 void Reply(const std::string& message); | 67 void Reply(const std::string& message); |
| 79 | 68 |
| 80 protected: | 69 protected: |
| 81 virtual ~TestSendMessageFunction(); | 70 virtual ~TestSendMessageFunction(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 protected: | 118 protected: |
| 130 virtual ~TestWaitForRoundTripFunction(); | 119 virtual ~TestWaitForRoundTripFunction(); |
| 131 | 120 |
| 132 // TestExtensionFunction: | 121 // TestExtensionFunction: |
| 133 virtual bool RunSafe() OVERRIDE; | 122 virtual bool RunSafe() OVERRIDE; |
| 134 }; | 123 }; |
| 135 | 124 |
| 136 } // namespace extensions | 125 } // namespace extensions |
| 137 | 126 |
| 138 #endif // EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ | 127 #endif // EXTENSIONS_BROWSER_API_TEST_TEST_API_H_ |
| OLD | NEW |