OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_BREAKPAD_APP_BREAKPAD_CLIENT_H_ | 5 #ifndef COMPONENTS_CRASH_APP_BREAKPAD_CLIENT_H_ |
6 #define COMPONENTS_BREAKPAD_APP_BREAKPAD_CLIENT_H_ | 6 #define COMPONENTS_CRASH_APP_BREAKPAD_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class FilePath; | 14 class FilePath; |
15 } | 15 } |
16 | 16 |
17 #if defined(OS_MACOSX) | 17 #if defined(OS_MACOSX) |
18 // We don't want to directly include | 18 // We don't want to directly include |
19 // breakpad/src/client/mac/Framework/Breakpad.h here, so we repeat the | 19 // breakpad/src/client/mac/Framework/Breakpad.h here, so we repeat the |
20 // definition of BreakpadRef. | 20 // definition of BreakpadRef. |
21 // | 21 // |
22 // On Mac, when compiling without breakpad support, a stub implementation is | 22 // On Mac, when compiling without breakpad support, a stub implementation is |
23 // compiled in. Not having any includes of the breakpad library allows for | 23 // compiled in. Not having any includes of the breakpad library allows for |
24 // reusing this header for the stub. | 24 // reusing this header for the stub. |
25 typedef void* BreakpadRef; | 25 typedef void* BreakpadRef; |
26 #endif | 26 #endif |
27 | 27 |
28 namespace breakpad { | 28 namespace breakpad { |
29 | 29 |
30 class BreakpadClient; | 30 class BreakpadClient; |
31 | 31 |
32 // Setter and getter for the client. The client should be set early, before any | 32 // Setter and getter for the client. The client should be set early, before any |
33 // breakpad code is called, and should stay alive throughout the entire runtime. | 33 // breakpad code is called, and should stay alive throughout the entire runtime. |
34 void SetBreakpadClient(BreakpadClient* client); | 34 void SetBreakpadClient(BreakpadClient* client); |
35 | 35 |
36 #if defined(BREAKPAD_IMPLEMENTATION) | 36 #if defined(CRASH_IMPLEMENTATION) |
37 // Breakpad's embedder API should only be used by breakpad. | 37 // Breakpad's embedder API should only be used by breakpad. |
38 BreakpadClient* GetBreakpadClient(); | 38 BreakpadClient* GetBreakpadClient(); |
39 #endif | 39 #endif |
40 | 40 |
41 // Interface that the embedder implements. | 41 // Interface that the embedder implements. |
42 class BreakpadClient { | 42 class BreakpadClient { |
43 public: | 43 public: |
44 BreakpadClient(); | 44 BreakpadClient(); |
45 virtual ~BreakpadClient(); | 45 virtual ~BreakpadClient(); |
46 | 46 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // Install additional breakpad filter callbacks. | 133 // Install additional breakpad filter callbacks. |
134 virtual void InstallAdditionalFilters(BreakpadRef breakpad); | 134 virtual void InstallAdditionalFilters(BreakpadRef breakpad); |
135 #endif | 135 #endif |
136 | 136 |
137 // Returns true if breakpad should run in the given process type. | 137 // Returns true if breakpad should run in the given process type. |
138 virtual bool EnableBreakpadForProcess(const std::string& process_type); | 138 virtual bool EnableBreakpadForProcess(const std::string& process_type); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace breakpad | 141 } // namespace breakpad |
142 | 142 |
143 #endif // COMPONENTS_BREAKPAD_APP_BREAKPAD_CLIENT_H_ | 143 #endif // COMPONENTS_CRASH_APP_BREAKPAD_CLIENT_H_ |
OLD | NEW |