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 CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 class RenderViewHost; | 40 class RenderViewHost; |
41 class WebContents; | 41 class WebContents; |
42 } | 42 } |
43 | 43 |
44 namespace extensions { | 44 namespace extensions { |
45 class WindowController; | 45 class WindowController; |
46 } | 46 } |
47 | 47 |
48 #ifdef NDEBUG | 48 #ifdef NDEBUG |
49 #define EXTENSION_FUNCTION_VALIDATE(test) do { \ | 49 #define EXTENSION_FUNCTION_VALIDATE(test) do { \ |
50 if (!(test)) { \ | 50 if (!(test).get()) { \ |
51 bad_message_ = true; \ | 51 bad_message_ = true; \ |
52 return false; \ | 52 return false; \ |
53 } \ | 53 } \ |
54 } while (0) | 54 } while (0) |
55 #else // NDEBUG | 55 #else // NDEBUG |
56 #define EXTENSION_FUNCTION_VALIDATE(test) CHECK(test) | 56 #define EXTENSION_FUNCTION_VALIDATE(test) CHECK(test) |
57 #endif // NDEBUG | 57 #endif // NDEBUG |
58 | 58 |
59 #define EXTENSION_FUNCTION_ERROR(error) do { \ | 59 #define EXTENSION_FUNCTION_ERROR(error) do { \ |
60 error_ = error; \ | 60 error_ = error; \ |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 public: | 448 public: |
449 SyncIOThreadExtensionFunction(); | 449 SyncIOThreadExtensionFunction(); |
450 | 450 |
451 virtual void Run() OVERRIDE; | 451 virtual void Run() OVERRIDE; |
452 | 452 |
453 protected: | 453 protected: |
454 virtual ~SyncIOThreadExtensionFunction(); | 454 virtual ~SyncIOThreadExtensionFunction(); |
455 }; | 455 }; |
456 | 456 |
457 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ | 457 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_H_ |
OLD | NEW |