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 CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "content/public/browser/browser_main_parts.h" | 12 #include "content/public/browser/browser_main_parts.h" |
13 #include "content/public/common/main_function_params.h" | 13 #include "content/public/common/main_function_params.h" |
14 #include "content/shell/browser/shell_browser_context.h" | 14 #include "content/shell/browser/shell_browser_context.h" |
15 | 15 |
16 #if defined(OS_ANDROID) | |
17 namespace breakpad { | |
18 class CrashDumpManager; | |
19 } | |
20 #endif | |
21 | |
22 namespace net { | 16 namespace net { |
23 class NetLog; | 17 class NetLog; |
24 } | 18 } |
25 | 19 |
26 namespace content { | 20 namespace content { |
27 | 21 |
28 class ShellBrowserMainParts : public BrowserMainParts { | 22 class ShellBrowserMainParts : public BrowserMainParts { |
29 public: | 23 public: |
30 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); | 24 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); |
31 ~ShellBrowserMainParts() override; | 25 ~ShellBrowserMainParts() override; |
(...skipping 22 matching lines...) Expand all Loading... |
54 virtual void InitializeMessageLoopContext(); | 48 virtual void InitializeMessageLoopContext(); |
55 | 49 |
56 void set_browser_context(ShellBrowserContext* context) { | 50 void set_browser_context(ShellBrowserContext* context) { |
57 browser_context_.reset(context); | 51 browser_context_.reset(context); |
58 } | 52 } |
59 void set_off_the_record_browser_context(ShellBrowserContext* context) { | 53 void set_off_the_record_browser_context(ShellBrowserContext* context) { |
60 off_the_record_browser_context_.reset(context); | 54 off_the_record_browser_context_.reset(context); |
61 } | 55 } |
62 | 56 |
63 private: | 57 private: |
64 #if defined(OS_ANDROID) | |
65 std::unique_ptr<breakpad::CrashDumpManager> crash_dump_manager_; | |
66 #endif | |
67 std::unique_ptr<net::NetLog> net_log_; | 58 std::unique_ptr<net::NetLog> net_log_; |
68 std::unique_ptr<ShellBrowserContext> browser_context_; | 59 std::unique_ptr<ShellBrowserContext> browser_context_; |
69 std::unique_ptr<ShellBrowserContext> off_the_record_browser_context_; | 60 std::unique_ptr<ShellBrowserContext> off_the_record_browser_context_; |
70 | 61 |
71 // For running content_browsertests. | 62 // For running content_browsertests. |
72 const MainFunctionParams parameters_; | 63 const MainFunctionParams parameters_; |
73 bool run_message_loop_; | 64 bool run_message_loop_; |
74 | 65 |
75 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); | 66 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |
76 }; | 67 }; |
77 | 68 |
78 } // namespace content | 69 } // namespace content |
79 | 70 |
80 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 71 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |