ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_context_observer.h
blobdbc79bacac6096173b508a61301f028b41a128aa
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_
8 #include "base/strings/string16.h"
9 #include "url/gurl.h"
11 namespace content {
13 class ServiceWorkerContextObserver {
14 public:
15 struct ErrorInfo {
16 ErrorInfo(const base::string16& message,
17 int line,
18 int column,
19 const GURL& url)
20 : error_message(message),
21 line_number(line),
22 column_number(column),
23 source_url(url) {}
24 const base::string16 error_message;
25 const int line_number;
26 const int column_number;
27 const GURL source_url;
29 struct ConsoleMessage {
30 ConsoleMessage(int source_identifier,
31 int message_level,
32 const base::string16& message,
33 int line_number,
34 const GURL& source_url)
35 : source_identifier(source_identifier),
36 message_level(message_level),
37 message(message),
38 line_number(line_number),
39 source_url(source_url) {}
40 const int source_identifier;
41 const int message_level;
42 const base::string16 message;
43 const int line_number;
44 const GURL source_url;
46 virtual void OnWorkerStarted(int64 version_id,
47 int process_id,
48 int thread_id) {}
49 virtual void OnWorkerStopped(int64 version_id,
50 int process_id,
51 int thread_id) {}
52 virtual void OnVersionStateChanged(int64 version_id) {}
53 virtual void OnErrorReported(int64 version_id,
54 int process_id,
55 int thread_id,
56 const ErrorInfo& info) {}
57 virtual void OnReportConsoleMessage(int64 version_id,
58 int process_id,
59 int thread_id,
60 const ConsoleMessage& message) {}
61 virtual void OnRegistrationStored(const GURL& pattern) {}
62 virtual void OnRegistrationDeleted(int64 registration_id,
63 const GURL& pattern) {}
65 // Notified when the storage corruption recovery is completed and all stored
66 // data is wiped out.
67 virtual void OnStorageWiped() {}
69 protected:
70 virtual ~ServiceWorkerContextObserver() {}
73 } // namespace content
75 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_