| 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 25 matching lines...) Expand all Loading... |
| 36 #include "include/v8.h" | 36 #include "include/v8.h" |
| 37 #include "src/debug/debug-interface.h" | 37 #include "src/debug/debug-interface.h" |
| 38 | 38 |
| 39 namespace v8_inspector { | 39 namespace v8_inspector { |
| 40 | 40 |
| 41 class V8DebuggerScript { | 41 class V8DebuggerScript { |
| 42 public: | 42 public: |
| 43 V8DebuggerScript(v8::Isolate* isolate, | 43 V8DebuggerScript(v8::Isolate* isolate, |
| 44 v8::Local<v8::DebugInterface::Script> script, | 44 v8::Local<v8::DebugInterface::Script> script, |
| 45 bool isLiveEdit); | 45 bool isLiveEdit); |
| 46 V8DebuggerScript(String16 id, String16 url, String16 source); |
| 46 ~V8DebuggerScript(); | 47 ~V8DebuggerScript(); |
| 47 | 48 |
| 48 const String16& scriptId() const { return m_id; } | 49 const String16& scriptId() const { return m_id; } |
| 49 const String16& url() const { return m_url; } | 50 const String16& url() const { return m_url; } |
| 50 bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } | 51 bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } |
| 51 const String16& sourceURL() const; | 52 const String16& sourceURL() const; |
| 52 const String16& sourceMappingURL() const { return m_sourceMappingURL; } | 53 const String16& sourceMappingURL() const { return m_sourceMappingURL; } |
| 53 v8::Local<v8::String> source(v8::Isolate*) const; | 54 String16 source(v8::Isolate*) const; |
| 54 const String16& hash() const { return m_hash; } | 55 const String16& hash(v8::Isolate*) const; |
| 55 int startLine() const { return m_startLine; } | 56 int startLine() const { return m_startLine; } |
| 56 int startColumn() const { return m_startColumn; } | 57 int startColumn() const { return m_startColumn; } |
| 57 int endLine() const { return m_endLine; } | 58 int endLine() const { return m_endLine; } |
| 58 int endColumn() const { return m_endColumn; } | 59 int endColumn() const { return m_endColumn; } |
| 59 int executionContextId() const { return m_executionContextId; } | 60 int executionContextId() const { return m_executionContextId; } |
| 60 const String16& executionContextAuxData() const { | 61 const String16& executionContextAuxData() const { |
| 61 return m_executionContextAuxData; | 62 return m_executionContextAuxData; |
| 62 } | 63 } |
| 63 bool isLiveEdit() const { return m_isLiveEdit; } | 64 bool isLiveEdit() const { return m_isLiveEdit; } |
| 64 | 65 |
| 65 void setSourceURL(const String16&); | 66 void setSourceURL(const String16&); |
| 66 void setSourceMappingURL(const String16&); | 67 void setSourceMappingURL(const String16&); |
| 67 void setSource(v8::Local<v8::String>); | 68 void setSource(v8::Local<v8::String>); |
| 68 | 69 |
| 69 bool getPossibleBreakpoints( | 70 bool getPossibleBreakpoints( |
| 70 const v8::DebugInterface::Location& start, | 71 const v8::DebugInterface::Location& start, |
| 71 const v8::DebugInterface::Location& end, | 72 const v8::DebugInterface::Location& end, |
| 72 std::vector<v8::DebugInterface::Location>* locations); | 73 std::vector<v8::DebugInterface::Location>* locations); |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 String16 m_id; | 76 String16 m_id; |
| 76 String16 m_url; | 77 String16 m_url; |
| 77 String16 m_sourceURL; | 78 String16 m_sourceURL; |
| 78 String16 m_sourceMappingURL; | 79 String16 m_sourceMappingURL; |
| 79 v8::Global<v8::String> m_source; | 80 v8::Global<v8::String> m_sourceObj; |
| 80 String16 m_hash; | 81 String16 m_source; |
| 81 int m_startLine; | 82 mutable String16 m_hash; |
| 82 int m_startColumn; | 83 int m_startLine = 0; |
| 83 int m_endLine; | 84 int m_startColumn = 0; |
| 84 int m_endColumn; | 85 int m_endLine = 0; |
| 85 int m_executionContextId; | 86 int m_endColumn = 0; |
| 87 int m_executionContextId = 0; |
| 86 String16 m_executionContextAuxData; | 88 String16 m_executionContextAuxData; |
| 87 bool m_isLiveEdit; | 89 bool m_isLiveEdit = false; |
| 88 | 90 |
| 89 v8::Isolate* m_isolate; | 91 v8::Isolate* m_isolate; |
| 90 v8::Global<v8::DebugInterface::Script> m_script; | 92 v8::Global<v8::DebugInterface::Script> m_script; |
| 91 | 93 |
| 92 DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript); | 94 DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript); |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 } // namespace v8_inspector | 97 } // namespace v8_inspector |
| 96 | 98 |
| 97 #endif // V8_INSPECTOR_V8DEBUGGERSCRIPT_H_ | 99 #endif // V8_INSPECTOR_V8DEBUGGERSCRIPT_H_ |
| OLD | NEW |