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

Side by Side Diff: third_party/WebKit/Source/modules/geolocation/PositionError.h

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 /* 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 18 matching lines...) Expand all
29 #include "bindings/core/v8/ScriptWrappable.h" 29 #include "bindings/core/v8/ScriptWrappable.h"
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 #include "wtf/text/WTFString.h" 31 #include "wtf/text/WTFString.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class PositionError final : public GarbageCollectedFinalized<PositionError>, pub lic ScriptWrappable { 35 class PositionError final : public GarbageCollectedFinalized<PositionError>, pub lic ScriptWrappable {
36 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
37 public: 37 public:
38 enum ErrorCode { 38 enum ErrorCode {
39 PERMISSION_DENIED = 1, 39 kPermissionDenied = 1,
40 POSITION_UNAVAILABLE = 2, 40 kPositionUnavailable = 2,
41 TIMEOUT = 3 41 kTimeout = 3
42 }; 42 };
43 43
44 static PositionError* create(ErrorCode code, const String& message) { return new PositionError(code, message); } 44 static PositionError* create(ErrorCode code, const String& message) { return new PositionError(code, message); }
45 DEFINE_INLINE_TRACE() { } 45 DEFINE_INLINE_TRACE() { }
46 46
47 ErrorCode code() const { return m_code; } 47 ErrorCode code() const { return m_code; }
48 const String& message() const { return m_message; } 48 const String& message() const { return m_message; }
49 void setIsFatal(bool isFatal) { m_isFatal = isFatal; } 49 void setIsFatal(bool isFatal) { m_isFatal = isFatal; }
50 bool isFatal() const { return m_isFatal; } 50 bool isFatal() const { return m_isFatal; }
51 51
52 private: 52 private:
53 PositionError(ErrorCode code, const String& message) 53 PositionError(ErrorCode code, const String& message)
54 : m_code(code) 54 : m_code(code)
55 , m_message(message) 55 , m_message(message)
56 , m_isFatal(false) { } 56 , m_isFatal(false) { }
57 57
58 ErrorCode m_code; 58 ErrorCode m_code;
59 String m_message; 59 String m_message;
60 // Whether the error is fatal, such that no request can ever obtain a good 60 // Whether the error is fatal, such that no request can ever obtain a good
61 // position fix in the future. 61 // position fix in the future.
62 bool m_isFatal; 62 bool m_isFatal;
63 }; 63 };
64 64
65 } // namespace blink 65 } // namespace blink
66 66
67 #endif // PositionError_h 67 #endif // PositionError_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698