OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
30 #include "heap/Handle.h" | 30 #include "heap/Handle.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class PositionError : public RefCountedWillBeGarbageCollectedFinalized<PositionE
rror>, public ScriptWrappable { | 37 class PositionError : public RefCountedWillBeGarbageCollectedFinalized<PositionE
rror>, public ScriptWrappable { |
38 DECLARE_GC_INFO; | |
39 public: | 38 public: |
40 enum ErrorCode { | 39 enum ErrorCode { |
41 PERMISSION_DENIED = 1, | 40 PERMISSION_DENIED = 1, |
42 POSITION_UNAVAILABLE = 2, | 41 POSITION_UNAVAILABLE = 2, |
43 TIMEOUT = 3 | 42 TIMEOUT = 3 |
44 }; | 43 }; |
45 | 44 |
46 static PassRefPtrWillBeRawPtr<PositionError> create(ErrorCode code, const St
ring& message) { return adoptRefWillBeNoop(new PositionError(code, message)); } | 45 static PassRefPtrWillBeRawPtr<PositionError> create(ErrorCode code, const St
ring& message) { return adoptRefWillBeNoop(new PositionError(code, message)); } |
47 void trace(Visitor*) { } | 46 void trace(Visitor*) { } |
48 | 47 |
(...skipping 14 matching lines...) Expand all Loading... |
63 ErrorCode m_code; | 62 ErrorCode m_code; |
64 String m_message; | 63 String m_message; |
65 // Whether the error is fatal, such that no request can ever obtain a good | 64 // Whether the error is fatal, such that no request can ever obtain a good |
66 // position fix in the future. | 65 // position fix in the future. |
67 bool m_isFatal; | 66 bool m_isFatal; |
68 }; | 67 }; |
69 | 68 |
70 } // namespace WebCore | 69 } // namespace WebCore |
71 | 70 |
72 #endif // PositionError_h | 71 #endif // PositionError_h |
OLD | NEW |