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 CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 STOPPED, | 44 STOPPED, |
45 STARTING, | 45 STARTING, |
46 RUNNING, | 46 RUNNING, |
47 STOPPING, | 47 STOPPING, |
48 }; | 48 }; |
49 | 49 |
50 class Listener { | 50 class Listener { |
51 public: | 51 public: |
52 virtual ~Listener() {} | 52 virtual ~Listener() {} |
53 virtual void OnStarted() {} | 53 virtual void OnStarted() {} |
54 virtual void OnStopped() {} | 54 virtual void OnStopped(Status old_status) {} |
55 virtual void OnPausedAfterDownload() {} | 55 virtual void OnPausedAfterDownload() {} |
56 virtual void OnReportException(const base::string16& error_message, | 56 virtual void OnReportException(const base::string16& error_message, |
57 int line_number, | 57 int line_number, |
58 int column_number, | 58 int column_number, |
59 const GURL& source_url) {} | 59 const GURL& source_url) {} |
60 virtual void OnReportConsoleMessage(int source_identifier, | 60 virtual void OnReportConsoleMessage(int source_identifier, |
61 int message_level, | 61 int message_level, |
62 const base::string16& message, | 62 const base::string16& message, |
63 int line_number, | 63 int line_number, |
64 const GURL& source_url) {} | 64 const GURL& source_url) {} |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 ListenerList listener_list_; | 197 ListenerList listener_list_; |
198 | 198 |
199 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 199 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
200 | 200 |
201 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 201 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
202 }; | 202 }; |
203 | 203 |
204 } // namespace content | 204 } // namespace content |
205 | 205 |
206 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 206 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
OLD | NEW |