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

Side by Side Diff: third_party/WebKit/public/web/WebEmbeddedWorker.h

Issue 1908313003: Shows the error message while fetching the SW script in the DevTools console. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated falken's comment Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #ifndef WebEmbeddedWorker_h 31 #ifndef WebEmbeddedWorker_h
32 #define WebEmbeddedWorker_h 32 #define WebEmbeddedWorker_h
33 33
34 #include "public/platform/WebCommon.h" 34 #include "public/platform/WebCommon.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class WebServiceWorkerContextClient; 38 class WebServiceWorkerContextClient;
39 class WebString; 39 class WebString;
40 class WebWorkerContentSettingsClientProxy; 40 class WebWorkerContentSettingsClientProxy;
41 struct WebConsoleMessage;
41 struct WebEmbeddedWorkerStartData; 42 struct WebEmbeddedWorkerStartData;
42 43
43 // An interface to start and terminate an embedded worker. 44 // An interface to start and terminate an embedded worker.
44 // All methods of this class must be called on the main thread. 45 // All methods of this class must be called on the main thread.
45 class WebEmbeddedWorker { 46 class WebEmbeddedWorker {
46 public: 47 public:
47 // Invoked on the main thread to instantiate a WebEmbeddedWorker. 48 // Invoked on the main thread to instantiate a WebEmbeddedWorker.
48 // The given WebWorkerContextClient and WebWorkerContentSettingsClientProxy 49 // The given WebWorkerContextClient and WebWorkerContentSettingsClientProxy
49 // are going to be passed on to the worker thread and is held by a newly 50 // are going to be passed on to the worker thread and is held by a newly
50 // created WorkerGlobalScope. 51 // created WorkerGlobalScope.
51 BLINK_EXPORT static WebEmbeddedWorker* create( 52 BLINK_EXPORT static WebEmbeddedWorker* create(
52 WebServiceWorkerContextClient*, 53 WebServiceWorkerContextClient*,
53 WebWorkerContentSettingsClientProxy*); 54 WebWorkerContentSettingsClientProxy*);
54 55
55 virtual ~WebEmbeddedWorker() { } 56 virtual ~WebEmbeddedWorker() { }
56 57
57 // Starts and terminates WorkerThread and WorkerGlobalScope. 58 // Starts and terminates WorkerThread and WorkerGlobalScope.
58 virtual void startWorkerContext(const WebEmbeddedWorkerStartData&) = 0; 59 virtual void startWorkerContext(const WebEmbeddedWorkerStartData&) = 0;
59 virtual void terminateWorkerContext() = 0; 60 virtual void terminateWorkerContext() = 0;
60 61
61 // Resumes starting a worker startup that was paused via 62 // Resumes starting a worker startup that was paused via
62 // WebEmbeddedWorkerStartData.pauseAfterDownloadMode. 63 // WebEmbeddedWorkerStartData.pauseAfterDownloadMode.
63 virtual void resumeAfterDownload() = 0; 64 virtual void resumeAfterDownload() = 0;
64 65
65 // Inspector related methods. 66 // Inspector related methods.
66 virtual void attachDevTools(const WebString& hostId, int sessionId) = 0; 67 virtual void attachDevTools(const WebString& hostId, int sessionId) = 0;
67 virtual void reattachDevTools(const WebString& hostId, int sessionId, const WebString& savedState) = 0; 68 virtual void reattachDevTools(const WebString& hostId, int sessionId, const WebString& savedState) = 0;
68 virtual void detachDevTools() = 0; 69 virtual void detachDevTools() = 0;
69 virtual void dispatchDevToolsMessage(int sessionId, const WebString&) = 0; 70 virtual void dispatchDevToolsMessage(int sessionId, const WebString&) = 0;
71 virtual void addMessageToConsole(const WebConsoleMessage&) = 0;
70 }; 72 };
71 73
72 } // namespace blink 74 } // namespace blink
73 75
74 #endif // WebEmbeddedWorker_h 76 #endif // WebEmbeddedWorker_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698