Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 #ifndef V8DebuggerScript_h | 30 #ifndef V8DebuggerScript_h |
| 31 #define V8DebuggerScript_h | 31 #define V8DebuggerScript_h |
| 32 | 32 |
| 33 #include "platform/inspector_protocol/Allocator.h" | 33 #include "platform/inspector_protocol/Allocator.h" |
| 34 #include "platform/inspector_protocol/String16.h" | 34 #include "platform/inspector_protocol/String16.h" |
| 35 #include <v8.h> | 35 #include <v8.h> |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class V8DebuggerScript { | 39 class V8DebuggerScript { |
| 40 PROTOCOL_DISALLOW_NEW(); | 40 PROTOCOL_DISALLOW_COPY(V8DebuggerScript); |
| 41 public: | 41 public: |
| 42 V8DebuggerScript(); | 42 V8DebuggerScript(); |
| 43 ~V8DebuggerScript(); | |
| 43 | 44 |
| 45 String16 scriptId() const { return m_id; } | |
| 44 String16 url() const { return m_url; } | 46 String16 url() const { return m_url; } |
| 45 bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } | 47 bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } |
| 46 String16 sourceURL() const; | 48 String16 sourceURL() const; |
| 47 String16 sourceMappingURL() const { return m_sourceMappingURL; } | 49 String16 sourceMappingURL() const { return m_sourceMappingURL; } |
| 48 String16 source() const { return m_source; } | 50 v8::Local<v8::String> source(v8::Isolate*) const; |
| 49 String16 hash() const { return m_hash; } | 51 String16 hash() const { return m_hash; } |
| 50 int startLine() const { return m_startLine; } | 52 int startLine() const { return m_startLine; } |
| 51 int startColumn() const { return m_startColumn; } | 53 int startColumn() const { return m_startColumn; } |
| 52 int endLine() const { return m_endLine; } | 54 int endLine() const { return m_endLine; } |
| 53 int endColumn() const { return m_endColumn; } | 55 int endColumn() const { return m_endColumn; } |
| 54 int executionContextId() const { return m_executionContextId; } | 56 int executionContextId() const { return m_executionContextId; } |
| 55 bool isContentScript() const { return m_isContentScript; } | 57 bool isContentScript() const { return m_isContentScript; } |
| 56 bool isInternalScript() const { return m_isInternalScript; } | 58 bool isInternalScript() const { return m_isInternalScript; } |
| 57 bool isLiveEdit() const { return m_isLiveEdit; } | 59 bool isLiveEdit() const { return m_isLiveEdit; } |
| 58 | 60 |
| 59 V8DebuggerScript& setURL(const String16&); | 61 V8DebuggerScript* setScriptId(const String16&); |
|
kozy
2016/06/29 00:34:05
It looks like we use most part of this setters onl
| |
| 60 V8DebuggerScript& setSourceURL(const String16&); | 62 V8DebuggerScript* setURL(const String16&); |
| 61 V8DebuggerScript& setSourceMappingURL(const String16&); | 63 V8DebuggerScript* setSourceURL(const String16&); |
| 62 V8DebuggerScript& setSource(const String16&); | 64 V8DebuggerScript* setSourceMappingURL(const String16&); |
| 63 V8DebuggerScript& setHash(const String16&); | 65 V8DebuggerScript* setSource(v8::Isolate*, v8::Local<v8::String>); |
| 64 V8DebuggerScript& setStartLine(int); | 66 V8DebuggerScript* setHash(const String16&); |
| 65 V8DebuggerScript& setStartColumn(int); | 67 V8DebuggerScript* setStartLine(int); |
| 66 V8DebuggerScript& setEndLine(int); | 68 V8DebuggerScript* setStartColumn(int); |
| 67 V8DebuggerScript& setEndColumn(int); | 69 V8DebuggerScript* setEndLine(int); |
| 68 V8DebuggerScript& setExecutionContextId(int); | 70 V8DebuggerScript* setEndColumn(int); |
| 69 V8DebuggerScript& setIsContentScript(bool); | 71 V8DebuggerScript* setExecutionContextId(int); |
| 70 V8DebuggerScript& setIsInternalScript(bool); | 72 V8DebuggerScript* setIsContentScript(bool); |
| 71 V8DebuggerScript& setIsLiveEdit(bool); | 73 V8DebuggerScript* setIsInternalScript(bool); |
| 74 V8DebuggerScript* setIsLiveEdit(bool); | |
| 72 | 75 |
| 73 private: | 76 private: |
| 77 String16 m_id; | |
| 74 String16 m_url; | 78 String16 m_url; |
| 75 String16 m_sourceURL; | 79 String16 m_sourceURL; |
| 76 String16 m_sourceMappingURL; | 80 String16 m_sourceMappingURL; |
| 77 String16 m_source; | 81 v8::Global<v8::String> m_source; |
| 78 String16 m_hash; | 82 String16 m_hash; |
| 79 int m_startLine; | 83 int m_startLine; |
| 80 int m_startColumn; | 84 int m_startColumn; |
| 81 int m_endLine; | 85 int m_endLine; |
| 82 int m_endColumn; | 86 int m_endColumn; |
| 83 int m_executionContextId; | 87 int m_executionContextId; |
| 84 bool m_isContentScript; | 88 bool m_isContentScript; |
| 85 bool m_isInternalScript; | 89 bool m_isInternalScript; |
| 86 bool m_isLiveEdit; | 90 bool m_isLiveEdit; |
| 87 }; | 91 }; |
| 88 | 92 |
| 89 struct V8DebuggerParsedScript { | |
| 90 String16 scriptId; | |
| 91 V8DebuggerScript script; | |
| 92 bool success; | |
| 93 }; | |
| 94 | |
| 95 } // namespace blink | 93 } // namespace blink |
| 96 | 94 |
| 97 | 95 |
| 98 #endif // V8DebuggerScript_h | 96 #endif // V8DebuggerScript_h |
| OLD | NEW |