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

Side by Side Diff: Source/modules/webdatabase/SQLError.h

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webdatabase/DatabaseSync.h ('k') | Source/modules/webdatabase/SQLResultSet.h » ('j') | 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 String message() const { return m_message.isolatedCopy(); } 56 String message() const { return m_message.isolatedCopy(); }
57 57
58 private: 58 private:
59 SQLErrorData(unsigned code, const String& message) : m_code(code), m_message (message.isolatedCopy()) { } 59 SQLErrorData(unsigned code, const String& message) : m_code(code), m_message (message.isolatedCopy()) { }
60 60
61 unsigned m_code; 61 unsigned m_code;
62 String m_message; 62 String m_message;
63 }; 63 };
64 64
65 class SQLError : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<SQLE rror>, public ScriptWrappable { 65 class SQLError : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<SQLE rror>, public ScriptWrappable {
66 DEFINE_WRAPPERTYPEINFO();
66 public: 67 public:
67 static PassRefPtrWillBeRawPtr<SQLError> create(const SQLErrorData& data) { r eturn adoptRefWillBeNoop(new SQLError(data)); } 68 static PassRefPtrWillBeRawPtr<SQLError> create(const SQLErrorData& data) { r eturn adoptRefWillBeNoop(new SQLError(data)); }
68 void trace(Visitor*) { } 69 void trace(Visitor*) { }
69 70
70 unsigned code() const { return m_data.code(); } 71 unsigned code() const { return m_data.code(); }
71 String message() const { return m_data.message(); } 72 String message() const { return m_data.message(); }
72 73
73 enum SQLErrorCode { 74 enum SQLErrorCode {
74 UNKNOWN_ERR = 0, 75 UNKNOWN_ERR = 0,
75 DATABASE_ERR = 1, 76 DATABASE_ERR = 1,
(...skipping 11 matching lines...) Expand all
87 88
88 private: 89 private:
89 explicit SQLError(const SQLErrorData& data) : m_data(data) 90 explicit SQLError(const SQLErrorData& data) : m_data(data)
90 { 91 {
91 ScriptWrappable::init(this); 92 ScriptWrappable::init(this);
92 } 93 }
93 94
94 const SQLErrorData m_data; 95 const SQLErrorData m_data;
95 }; 96 };
96 97
97 } 98 } // namespace blink
98 99
99 #endif // SQLError_h 100 #endif // SQLError_h
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/DatabaseSync.h ('k') | Source/modules/webdatabase/SQLResultSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698