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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/browser/browser_main_parts.h" | 10 #include "content/public/browser/browser_main_parts.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 } | 21 } |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 class NetLog; | 24 class NetLog; |
25 } | 25 } |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 class ShellBrowserContext; | 29 class ShellBrowserContext; |
30 class ShellDevToolsDelegate; | 30 class ShellDevToolsDelegate; |
31 class ShellPluginServiceFilter; | |
32 | 31 |
33 class ShellBrowserMainParts : public BrowserMainParts { | 32 class ShellBrowserMainParts : public BrowserMainParts { |
34 public: | 33 public: |
35 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); | 34 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); |
36 virtual ~ShellBrowserMainParts(); | 35 virtual ~ShellBrowserMainParts(); |
37 | 36 |
38 // BrowserMainParts overrides. | 37 // BrowserMainParts overrides. |
39 virtual void PreEarlyInitialization() override; | 38 virtual void PreEarlyInitialization() override; |
40 virtual void PreMainMessageLoopStart() override; | 39 virtual void PreMainMessageLoopStart() override; |
41 virtual void PostMainMessageLoopStart() override; | 40 virtual void PostMainMessageLoopStart() override; |
42 virtual void PreMainMessageLoopRun() override; | 41 virtual void PreMainMessageLoopRun() override; |
43 virtual bool MainMessageLoopRun(int* result_code) override; | 42 virtual bool MainMessageLoopRun(int* result_code) override; |
44 virtual void PostMainMessageLoopRun() override; | 43 virtual void PostMainMessageLoopRun() override; |
45 | 44 |
46 ShellDevToolsDelegate* devtools_delegate() { | 45 ShellDevToolsDelegate* devtools_delegate() { |
47 return devtools_delegate_.get(); | 46 return devtools_delegate_.get(); |
48 } | 47 } |
49 | 48 |
50 ShellBrowserContext* browser_context() { return browser_context_.get(); } | 49 ShellBrowserContext* browser_context() { return browser_context_.get(); } |
51 ShellBrowserContext* off_the_record_browser_context() { | 50 ShellBrowserContext* off_the_record_browser_context() { |
52 return off_the_record_browser_context_.get(); | 51 return off_the_record_browser_context_.get(); |
53 } | 52 } |
54 | 53 |
55 net::NetLog* net_log() { return net_log_.get(); } | 54 net::NetLog* net_log() { return net_log_.get(); } |
56 | 55 |
56 protected: | |
57 virtual void InitializeBrowserContexts(); | |
58 virtual void InitializeMessageLoopContext(); | |
59 | |
60 scoped_ptr<ShellBrowserContext> browser_context_; | |
jochen (gone - plz use gerrit)
2014/10/13 08:01:49
can you add a protected getter/setter instead?
Mike West
2014/10/13 09:52:26
Sure.
| |
61 scoped_ptr<ShellBrowserContext> off_the_record_browser_context_; | |
jochen (gone - plz use gerrit)
2014/10/13 08:01:49
i'm somewhat surprised that the layout tests shoul
Mike West
2014/10/13 09:52:25
It's not clear that they do.
That said, I think i
| |
62 | |
57 private: | 63 private: |
58 #if defined(OS_ANDROID) | 64 #if defined(OS_ANDROID) |
59 scoped_ptr<breakpad::CrashDumpManager> crash_dump_manager_; | 65 scoped_ptr<breakpad::CrashDumpManager> crash_dump_manager_; |
60 #endif | 66 #endif |
61 scoped_ptr<net::NetLog> net_log_; | 67 scoped_ptr<net::NetLog> net_log_; |
62 scoped_ptr<ShellBrowserContext> browser_context_; | |
63 scoped_ptr<ShellBrowserContext> off_the_record_browser_context_; | |
64 | 68 |
65 // For running content_browsertests. | 69 // For running content_browsertests. |
66 const MainFunctionParams parameters_; | 70 const MainFunctionParams parameters_; |
67 bool run_message_loop_; | 71 bool run_message_loop_; |
68 | 72 |
69 scoped_ptr<ShellDevToolsDelegate> devtools_delegate_; | 73 scoped_ptr<ShellDevToolsDelegate> devtools_delegate_; |
70 #if defined(ENABLE_PLUGINS) | |
71 scoped_ptr<ShellPluginServiceFilter> plugin_service_filter_; | |
72 #endif | |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); | 75 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); |
75 }; | 76 }; |
76 | 77 |
77 } // namespace content | 78 } // namespace content |
78 | 79 |
79 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ | 80 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |