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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/Maybe.h

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Maybe_h 5 #ifndef Maybe_h
6 #define Maybe_h 6 #define Maybe_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "wtf/text/WTFString.h" 9 #include "platform/inspector_protocol/String16.h"
dgozman 2016/03/08 01:35:12 class String16;
10 10
11 namespace blink { 11 namespace blink {
12 namespace protocol { 12 namespace protocol {
13 13
14 template<typename T> 14 template<typename T>
15 class Maybe { 15 class Maybe {
16 public: 16 public:
17 Maybe() { } 17 Maybe() { }
18 Maybe(PassOwnPtr<T> value) : m_value(value) { } 18 Maybe(PassOwnPtr<T> value) : m_value(value) { }
19 void operator=(PassOwnPtr<T> value) { m_value = value; } 19 void operator=(PassOwnPtr<T> value) { m_value = value; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Maybe() { } 63 Maybe() { }
64 Maybe(double value) : MaybeBase(value) { } 64 Maybe(double value) : MaybeBase(value) { }
65 using MaybeBase::operator=; 65 using MaybeBase::operator=;
66 }; 66 };
67 67
68 template<> 68 template<>
69 class Maybe<String> : public MaybeBase<String> { 69 class Maybe<String> : public MaybeBase<String> {
70 public: 70 public:
71 Maybe() { } 71 Maybe() { }
72 Maybe(const String& value) : MaybeBase(value) { } 72 Maybe(const String& value) : MaybeBase(value) { }
73 Maybe(const AtomicString& value) : MaybeBase(value) { }
74 using MaybeBase::operator=; 73 using MaybeBase::operator=;
75 }; 74 };
76 75
76 template<>
77 class Maybe<String16> : public MaybeBase<String16> {
78 public:
79 Maybe() { }
80 Maybe(const String16& value) : MaybeBase(value) { }
81 using MaybeBase::operator=;
82 };
83
77 } // namespace platform 84 } // namespace platform
78 } // namespace blink 85 } // namespace blink
79 86
80 #endif // !defined(Maybe_h) 87 #endif // !defined(Maybe_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698