| 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 WebScriptExecutionCallback_h | 5 #ifndef WebScriptExecutionCallback_h |
| 6 #define WebScriptExecutionCallback_h | 6 #define WebScriptExecutionCallback_h |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 class Value; | 9 class Value; |
| 10 template <class T> | 10 template <class T> |
| 11 class Local; | 11 class Local; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 template <typename T> | 16 template <typename T> |
| 17 class WebVector; | 17 class WebVector; |
| 18 | 18 |
| 19 class WebScriptExecutionCallback { | 19 class WebScriptExecutionCallback { |
| 20 public: | 20 public: |
| 21 virtual ~WebScriptExecutionCallback() {} | 21 virtual ~WebScriptExecutionCallback() {} |
| 22 | 22 |
| 23 // Method to be invoked when the asynchronous script is about to execute. |
| 24 virtual void willExecute() {} |
| 25 |
| 23 // Method to be invoked when the asynchronous script execution is complete. | 26 // Method to be invoked when the asynchronous script execution is complete. |
| 24 // After function call all objects in vector will be collected | 27 // After function call all objects in vector will be collected |
| 25 virtual void completed(const WebVector<v8::Local<v8::Value>>&) {} | 28 virtual void completed(const WebVector<v8::Local<v8::Value>>&) {} |
| 26 }; | 29 }; |
| 27 | 30 |
| 28 } // namespace blink | 31 } // namespace blink |
| 29 | 32 |
| 30 #endif // WebScriptExecutionCallback_h | 33 #endif // WebScriptExecutionCallback_h |
| OLD | NEW |