| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSION_FUNCTION_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class RenderFrameHost; | 42 class RenderFrameHost; |
| 43 class WebContents; | 43 class WebContents; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace extensions { | 46 namespace extensions { |
| 47 class ExtensionFunctionDispatcher; | 47 class ExtensionFunctionDispatcher; |
| 48 class IOThreadExtensionMessageFilter; | 48 class IOThreadExtensionMessageFilter; |
| 49 class QuotaLimitHeuristic; | 49 class QuotaLimitHeuristic; |
| 50 } | 50 } |
| 51 | 51 |
| 52 namespace IPC { | |
| 53 class Sender; | |
| 54 } | |
| 55 | |
| 56 #ifdef NDEBUG | 52 #ifdef NDEBUG |
| 57 #define EXTENSION_FUNCTION_VALIDATE(test) \ | 53 #define EXTENSION_FUNCTION_VALIDATE(test) \ |
| 58 do { \ | 54 do { \ |
| 59 if (!(test)) { \ | 55 if (!(test)) { \ |
| 60 this->set_bad_message(true); \ | 56 this->set_bad_message(true); \ |
| 61 return ValidationFailure(this); \ | 57 return ValidationFailure(this); \ |
| 62 } \ | 58 } \ |
| 63 } while (0) | 59 } while (0) |
| 64 #else // NDEBUG | 60 #else // NDEBUG |
| 65 #define EXTENSION_FUNCTION_VALIDATE(test) CHECK(test) | 61 #define EXTENSION_FUNCTION_VALIDATE(test) CHECK(test) |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 private: | 673 private: |
| 678 // If you're hitting a compile error here due to "final" - great! You're | 674 // If you're hitting a compile error here due to "final" - great! You're |
| 679 // doing the right thing, you just need to extend UIThreadExtensionFunction | 675 // doing the right thing, you just need to extend UIThreadExtensionFunction |
| 680 // instead of AsyncExtensionFunction. | 676 // instead of AsyncExtensionFunction. |
| 681 ResponseAction Run() final; | 677 ResponseAction Run() final; |
| 682 | 678 |
| 683 DISALLOW_COPY_AND_ASSIGN(AsyncExtensionFunction); | 679 DISALLOW_COPY_AND_ASSIGN(AsyncExtensionFunction); |
| 684 }; | 680 }; |
| 685 | 681 |
| 686 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ | 682 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
| OLD | NEW |