1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_STACK_FRAME_H_
6 #define EXTENSIONS_COMMON_STACK_FRAME_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h"
13 namespace extensions
{
17 StackFrame(const StackFrame
& frame
);
18 StackFrame(size_t line_number
,
20 const base::string16
& source
,
21 const base::string16
& function
);
24 // Construct a stack frame from a reported plain-text frame.
25 static scoped_ptr
<StackFrame
> CreateFromText(
26 const base::string16
& frame_text
);
28 bool operator==(const StackFrame
& rhs
) const;
32 base::string16 source
;
33 base::string16 function
; // optional
36 typedef std::vector
<StackFrame
> StackTrace
;
38 } // namespace extensions
40 #endif // EXTENSIONS_COMMON_STACK_FRAME_H_