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

Side by Side Diff: Source/bindings/core/v8/Nullable.h

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/PageScriptDebugServer.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Nullable_h 5 #ifndef Nullable_h
6 #define Nullable_h 6 #define Nullable_h
7 7
8 #include "wtf/Assertions.h" 8 #include "wtf/Assertions.h"
9 9
10 namespace WebCore { 10 namespace blink {
11 11
12 template <typename T> 12 template <typename T>
13 class Nullable { 13 class Nullable {
14 public: 14 public:
15 Nullable() 15 Nullable()
16 : m_value() 16 : m_value()
17 , m_isNull(true) { } 17 , m_isNull(true) { }
18 18
19 Nullable(const T& value) 19 Nullable(const T& value)
20 : m_value(value) 20 : m_value(value)
(...skipping 18 matching lines...) Expand all
39 bool operator==(const Nullable& other) const 39 bool operator==(const Nullable& other) const
40 { 40 {
41 return (m_isNull && other.m_isNull) || (!m_isNull && !other.m_isNull && m_value == other.m_value); 41 return (m_isNull && other.m_isNull) || (!m_isNull && !other.m_isNull && m_value == other.m_value);
42 } 42 }
43 43
44 private: 44 private:
45 T m_value; 45 T m_value;
46 bool m_isNull; 46 bool m_isNull;
47 }; 47 };
48 48
49 } // namespace WebCore 49 } // namespace blink
50 50
51 #endif // Nullable_h 51 #endif // Nullable_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/PageScriptDebugServer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698