Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: content/shell/browser/shell_browser_main_parts.h

Issue 2300703005: DevTools: merge devtools_http_handler into content - it is used in all the embedders anyways. (Closed)
Patch Set: for_landing! Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/DEPS ('k') | content/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 16 #if defined(OS_ANDROID)
17 namespace breakpad { 17 namespace breakpad {
18 class CrashDumpManager; 18 class CrashDumpManager;
19 } 19 }
20 #endif 20 #endif
21 21
22 namespace base {
23 class Thread;
24 }
25
26 namespace devtools_http_handler {
27 class DevToolsHttpHandler;
28 }
29
30 namespace net { 22 namespace net {
31 class NetLog; 23 class NetLog;
32 } 24 }
33 25
34 namespace content { 26 namespace content {
35 27
36 class ShellBrowserMainParts : public BrowserMainParts { 28 class ShellBrowserMainParts : public BrowserMainParts {
37 public: 29 public:
38 explicit ShellBrowserMainParts(const MainFunctionParams& parameters); 30 explicit ShellBrowserMainParts(const MainFunctionParams& parameters);
39 ~ShellBrowserMainParts() override; 31 ~ShellBrowserMainParts() override;
40 32
41 // BrowserMainParts overrides. 33 // BrowserMainParts overrides.
42 void PreEarlyInitialization() override; 34 void PreEarlyInitialization() override;
43 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
44 int PreCreateThreads() override; 36 int PreCreateThreads() override;
45 #endif 37 #endif
46 void PreMainMessageLoopStart() override; 38 void PreMainMessageLoopStart() override;
47 void PostMainMessageLoopStart() override; 39 void PostMainMessageLoopStart() override;
48 void PreMainMessageLoopRun() override; 40 void PreMainMessageLoopRun() override;
49 bool MainMessageLoopRun(int* result_code) override; 41 bool MainMessageLoopRun(int* result_code) override;
50 void PostMainMessageLoopRun() override; 42 void PostMainMessageLoopRun() override;
51 void PostDestroyThreads() override; 43 void PostDestroyThreads() override;
52 44
53 devtools_http_handler::DevToolsHttpHandler* devtools_http_handler() {
54 return devtools_http_handler_.get();
55 }
56
57 ShellBrowserContext* browser_context() { return browser_context_.get(); } 45 ShellBrowserContext* browser_context() { return browser_context_.get(); }
58 ShellBrowserContext* off_the_record_browser_context() { 46 ShellBrowserContext* off_the_record_browser_context() {
59 return off_the_record_browser_context_.get(); 47 return off_the_record_browser_context_.get();
60 } 48 }
61 49
62 net::NetLog* net_log() { return net_log_.get(); } 50 net::NetLog* net_log() { return net_log_.get(); }
63 51
64 protected: 52 protected:
65 virtual void InitializeBrowserContexts(); 53 virtual void InitializeBrowserContexts();
66 virtual void InitializeMessageLoopContext(); 54 virtual void InitializeMessageLoopContext();
(...skipping 10 matching lines...) Expand all
77 std::unique_ptr<breakpad::CrashDumpManager> crash_dump_manager_; 65 std::unique_ptr<breakpad::CrashDumpManager> crash_dump_manager_;
78 #endif 66 #endif
79 std::unique_ptr<net::NetLog> net_log_; 67 std::unique_ptr<net::NetLog> net_log_;
80 std::unique_ptr<ShellBrowserContext> browser_context_; 68 std::unique_ptr<ShellBrowserContext> browser_context_;
81 std::unique_ptr<ShellBrowserContext> off_the_record_browser_context_; 69 std::unique_ptr<ShellBrowserContext> off_the_record_browser_context_;
82 70
83 // For running content_browsertests. 71 // For running content_browsertests.
84 const MainFunctionParams parameters_; 72 const MainFunctionParams parameters_;
85 bool run_message_loop_; 73 bool run_message_loop_;
86 74
87 std::unique_ptr<devtools_http_handler::DevToolsHttpHandler>
88 devtools_http_handler_;
89
90 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); 75 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts);
91 }; 76 };
92 77
93 } // namespace content 78 } // namespace content
94 79
95 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ 80 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
OLDNEW
« no previous file with comments | « content/shell/DEPS ('k') | content/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698