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

Side by Side Diff: headless/lib/headless_content_main_delegate.h

Issue 2712093002: Enable building headless_shell in MAC. This is an initial implementation with a hidden window, rath… (Closed)
Patch Set: revet chrome/BUILD.gn Created 3 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 HEADLESS_LIB_HEADLESS_CONTENT_MAIN_DELEGATE_H_ 5 #ifndef HEADLESS_LIB_HEADLESS_CONTENT_MAIN_DELEGATE_H_
6 #define HEADLESS_LIB_HEADLESS_CONTENT_MAIN_DELEGATE_H_ 6 #define HEADLESS_LIB_HEADLESS_CONTENT_MAIN_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 explicit HeadlessContentMainDelegate( 28 explicit HeadlessContentMainDelegate(
29 std::unique_ptr<HeadlessBrowserImpl> browser); 29 std::unique_ptr<HeadlessBrowserImpl> browser);
30 ~HeadlessContentMainDelegate() override; 30 ~HeadlessContentMainDelegate() override;
31 31
32 // content::ContentMainDelegate implementation: 32 // content::ContentMainDelegate implementation:
33 bool BasicStartupComplete(int* exit_code) override; 33 bool BasicStartupComplete(int* exit_code) override;
34 void PreSandboxStartup() override; 34 void PreSandboxStartup() override;
35 int RunProcess( 35 int RunProcess(
36 const std::string& process_type, 36 const std::string& process_type,
37 const content::MainFunctionParams& main_function_params) override; 37 const content::MainFunctionParams& main_function_params) override;
38 void ZygoteForked() override;
39 content::ContentBrowserClient* CreateContentBrowserClient() override; 38 content::ContentBrowserClient* CreateContentBrowserClient() override;
40 39
41 HeadlessBrowserImpl* browser() const { return browser_.get(); } 40 HeadlessBrowserImpl* browser() const { return browser_.get(); }
42 41
42 #if !defined(OS_MACOSX) && defined(OS_POSIX) && !defined(OS_ANDROID)
43 void ZygoteForked() override;
44 #endif
45
43 private: 46 private:
44 friend class HeadlessBrowserTest; 47 friend class HeadlessBrowserTest;
45 48
46 void InitLogging(const base::CommandLine& command_line); 49 void InitLogging(const base::CommandLine& command_line);
47 void InitCrashReporter(const base::CommandLine& command_line); 50 void InitCrashReporter(const base::CommandLine& command_line);
48 static void InitializeResourceBundle(); 51 static void InitializeResourceBundle();
49 52
50 static HeadlessContentMainDelegate* GetInstance(); 53 static HeadlessContentMainDelegate* GetInstance();
51 54
52 std::unique_ptr<HeadlessContentBrowserClient> browser_client_; 55 std::unique_ptr<HeadlessContentBrowserClient> browser_client_;
53 HeadlessContentClient content_client_; 56 HeadlessContentClient content_client_;
54 HeadlessPlatformEventSource platform_event_source_; 57 HeadlessPlatformEventSource platform_event_source_;
55 58
56 std::unique_ptr<HeadlessBrowserImpl> browser_; 59 std::unique_ptr<HeadlessBrowserImpl> browser_;
57 60
58 DISALLOW_COPY_AND_ASSIGN(HeadlessContentMainDelegate); 61 DISALLOW_COPY_AND_ASSIGN(HeadlessContentMainDelegate);
59 }; 62 };
60 63
61 } // namespace headless 64 } // namespace headless
62 65
63 #endif // HEADLESS_LIB_HEADLESS_CONTENT_MAIN_DELEGATE_H_ 66 #endif // HEADLESS_LIB_HEADLESS_CONTENT_MAIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_content_browser_client.cc ('k') | headless/lib/headless_content_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698