OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_GLUE_WEBWORKERCLIENT_H_ |
| 6 #define WEBKIT_GLUE_WEBWORKERCLIENT_H_ |
| 7 |
| 8 #include "base/string16.h" |
| 9 |
| 10 // This is a version of the WebCore::WorkerObjectProxy interface that uses |
| 11 // Chrome data types. |
| 12 class WebWorkerClient { |
| 13 public: |
| 14 virtual ~WebWorkerClient() { } |
| 15 |
| 16 virtual void PostMessageToWorkerObject(const string16& message) = 0; |
| 17 virtual void PostExceptionToWorkerObject( |
| 18 const string16& error_message, |
| 19 int line_number, |
| 20 const string16& source_url) = 0; |
| 21 // destination, source, and level are the int values of the corresponding |
| 22 // WebKit enums. This avoids duplicating the enums and having to stay up to |
| 23 // date. |
| 24 virtual void PostConsoleMessageToWorkerObject( |
| 25 int destination, |
| 26 int source, |
| 27 int level, |
| 28 const string16& message, |
| 29 int line_number, |
| 30 const string16& source_url) = 0; |
| 31 virtual void ConfirmMessageFromWorkerObject(bool has_pending_activity) = 0; |
| 32 virtual void ReportPendingActivity(bool has_pending_activity) = 0; |
| 33 virtual void WorkerContextDestroyed() = 0; |
| 34 }; |
| 35 |
| 36 #endif // #ifndef WEBKIT_GLUE_WEBWORKERCLIENT_H_ |
OLD | NEW |