Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Side by Side Diff: content/browser/service_worker/service_worker_context_observer.h

Issue 998173002: Revise ServiceWorker DevTools protocols. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use DCHECK_CURRENTLY_ON Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/browser/service_worker/service_worker_version.h"
9 #include "url/gurl.h" 10 #include "url/gurl.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class ServiceWorkerContextObserver { 14 class ServiceWorkerContextObserver {
14 public: 15 public:
15 struct ErrorInfo { 16 struct ErrorInfo {
16 ErrorInfo(const base::string16& message, 17 ErrorInfo(const base::string16& message,
17 int line, 18 int line,
18 int column, 19 int column,
(...skipping 17 matching lines...) Expand all
36 message_level(message_level), 37 message_level(message_level),
37 message(message), 38 message(message),
38 line_number(line_number), 39 line_number(line_number),
39 source_url(source_url) {} 40 source_url(source_url) {}
40 const int source_identifier; 41 const int source_identifier;
41 const int message_level; 42 const int message_level;
42 const base::string16 message; 43 const base::string16 message;
43 const int line_number; 44 const int line_number;
44 const GURL source_url; 45 const GURL source_url;
45 }; 46 };
46 virtual void OnRunningStateChanged(int64 version_id) {} 47 virtual void OnNewLiveRegistration(int64 registration_id,
47 virtual void OnVersionStateChanged(int64 version_id) {} 48 const GURL& pattern) {}
49 virtual void OnNewLiveVersion(int64 version_id,
50 int64 registration_id,
51 const GURL& script_url) {}
52 virtual void OnRunningStateChanged(
53 int64 version_id,
54 ServiceWorkerVersion::RunningStatus running_status) {}
55 virtual void OnVersionStateChanged(int64 version_id,
56 ServiceWorkerVersion::Status status) {}
48 virtual void OnErrorReported(int64 version_id, 57 virtual void OnErrorReported(int64 version_id,
49 int process_id, 58 int process_id,
50 int thread_id, 59 int thread_id,
51 const ErrorInfo& info) {} 60 const ErrorInfo& info) {}
52 virtual void OnReportConsoleMessage(int64 version_id, 61 virtual void OnReportConsoleMessage(int64 version_id,
53 int process_id, 62 int process_id,
54 int thread_id, 63 int thread_id,
55 const ConsoleMessage& message) {} 64 const ConsoleMessage& message) {}
56 virtual void OnRegistrationStored(int64 registration_id, 65 virtual void OnRegistrationStored(int64 registration_id,
57 const GURL& pattern) {} 66 const GURL& pattern) {}
58 virtual void OnRegistrationDeleted(int64 registration_id, 67 virtual void OnRegistrationDeleted(int64 registration_id,
59 const GURL& pattern) {} 68 const GURL& pattern) {}
60 69
61 // Notified when the storage corruption recovery is completed and all stored 70 // Notified when the storage corruption recovery is completed and all stored
62 // data is wiped out. 71 // data is wiped out.
63 virtual void OnStorageWiped() {} 72 virtual void OnStorageWiped() {}
64 73
65 protected: 74 protected:
66 virtual ~ServiceWorkerContextObserver() {} 75 virtual ~ServiceWorkerContextObserver() {}
67 }; 76 };
68 77
69 } // namespace content 78 } // namespace content
70 79
71 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_ 80 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698