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 <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 class AsyncExtensionFunction : public UIThreadExtensionFunction { | 546 class AsyncExtensionFunction : public UIThreadExtensionFunction { |
547 public: | 547 public: |
548 AsyncExtensionFunction(); | 548 AsyncExtensionFunction(); |
549 | 549 |
550 protected: | 550 protected: |
551 virtual ~AsyncExtensionFunction(); | 551 virtual ~AsyncExtensionFunction(); |
552 | 552 |
553 // Deprecated: Override UIThreadExtensionFunction and implement Run() instead. | 553 // Deprecated: Override UIThreadExtensionFunction and implement Run() instead. |
554 // | 554 // |
555 // AsyncExtensionFunctions implement this method. Return true to indicate that | 555 // AsyncExtensionFunctions implement this method. Return true to indicate that |
556 // nothing has gone wrong yet; SendResponse must be called later. Return true | 556 // nothing has gone wrong yet; SendResponse must be called later. Return false |
557 // to respond immediately with an error. | 557 // to respond immediately with an error. |
558 virtual bool RunAsync() = 0; | 558 virtual bool RunAsync() = 0; |
559 | 559 |
560 // ValidationFailure override to match RunAsync(). | 560 // ValidationFailure override to match RunAsync(). |
561 static bool ValidationFailure(AsyncExtensionFunction* function); | 561 static bool ValidationFailure(AsyncExtensionFunction* function); |
562 | 562 |
563 private: | 563 private: |
564 virtual ResponseAction Run() OVERRIDE; | 564 virtual ResponseAction Run() OVERRIDE; |
565 }; | 565 }; |
566 | 566 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 virtual bool RunSync() = 0; | 606 virtual bool RunSync() = 0; |
607 | 607 |
608 // ValidationFailure override to match RunSync(). | 608 // ValidationFailure override to match RunSync(). |
609 static bool ValidationFailure(SyncIOThreadExtensionFunction* function); | 609 static bool ValidationFailure(SyncIOThreadExtensionFunction* function); |
610 | 610 |
611 private: | 611 private: |
612 virtual ResponseAction Run() OVERRIDE; | 612 virtual ResponseAction Run() OVERRIDE; |
613 }; | 613 }; |
614 | 614 |
615 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ | 615 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ |
OLD | NEW |