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

Unified Diff: public/platform/WebServiceWorkerError.h

Issue 27278002: Add an Error class for ServiceWorkers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix windows Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base.py ('k') | public/platform/WebServiceWorkerProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebServiceWorkerError.h
diff --git a/public/platform/WebMIDIAccessor.h b/public/platform/WebServiceWorkerError.h
similarity index 81%
copy from public/platform/WebMIDIAccessor.h
copy to public/platform/WebServiceWorkerError.h
index 71aba260a77ed58e7eb6d168429628430aafd97c..8ae4c2791e32e4d0a7debad45fd18743ee111b5f 100644
--- a/public/platform/WebMIDIAccessor.h
+++ b/public/platform/WebServiceWorkerError.h
@@ -28,22 +28,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebMIDIAccessor_h
-#define WebMIDIAccessor_h
+#ifndef WebServiceWorkerError_h
+#define WebServiceWorkerError_h
#include "WebString.h"
namespace WebKit {
-class WebMIDIAccessor {
-public:
- virtual ~WebMIDIAccessor() { }
+struct WebServiceWorkerError {
+ enum ErrorType {
+ DisabledError = 0,
+ SecurityError
+ };
- virtual void startSession() { }
- // |timeStamp| is measured in milliseconds as Web MIDI spec defines.
- virtual void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp) { }
+ WebServiceWorkerError(ErrorType errorType, const WebString& message)
+ : errorType(errorType), message(message) { }
+
+ ErrorType errorType;
+ WebString message;
};
} // namespace WebKit
-#endif // WebMIDIAccessor_h
+#endif
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base.py ('k') | public/platform/WebServiceWorkerProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698