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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8Regex.h

Issue 2246233002: [DevTools] Move platform/v8_inspector classes under v8_inspector namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // 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 V8Regex_h 5 #ifndef V8Regex_h
6 #define V8Regex_h 6 #define V8Regex_h
7 7
8 #include "platform/inspector_protocol/InspectorProtocol.h" 8 #include "platform/inspector_protocol/InspectorProtocol.h"
9 #include <v8.h> 9 #include <v8.h>
10 10
11 namespace blink { 11 namespace v8_inspector {
12 12
13 class V8InspectorImpl; 13 class V8InspectorImpl;
14 14
15 enum MultilineMode { 15 enum MultilineMode {
16 MultilineDisabled, 16 MultilineDisabled,
17 MultilineEnabled 17 MultilineEnabled
18 }; 18 };
19 19
20 class V8Regex { 20 class V8Regex {
21 PROTOCOL_DISALLOW_COPY(V8Regex); 21 PROTOCOL_DISALLOW_COPY(V8Regex);
22 public: 22 public:
23 V8Regex(V8InspectorImpl*, const String16&, bool caseSensitive, bool multilin e = false); 23 V8Regex(V8InspectorImpl*, const String16&, bool caseSensitive, bool multilin e = false);
24 int match(const String16&, int startFrom = 0, int* matchLength = 0) const; 24 int match(const String16&, int startFrom = 0, int* matchLength = 0) const;
25 bool isValid() const { return !m_regex.IsEmpty(); } 25 bool isValid() const { return !m_regex.IsEmpty(); }
26 const String16& errorMessage() const { return m_errorMessage; } 26 const String16& errorMessage() const { return m_errorMessage; }
27 27
28 private: 28 private:
29 V8InspectorImpl* m_inspector; 29 V8InspectorImpl* m_inspector;
30 v8::Global<v8::RegExp> m_regex; 30 v8::Global<v8::RegExp> m_regex;
31 String16 m_errorMessage; 31 String16 m_errorMessage;
32 }; 32 };
33 33
34 } // namespace blink 34 } // namespace v8_inspector
35 35
36 #endif // V8Regex_h 36 #endif // V8Regex_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698