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

Side by Side Diff: headless/app/headless_shell_main_delegate.h

Issue 1430673002: Headless demo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 (c) 2012 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 CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ 5 #ifndef CONTENT_SHELL_HEADLESS_HEADLESS_TEST_SHELL_MAIN_DELEGATE_H_
6 #define CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ 6 #define CONTENT_SHELL_HEADLESS_HEADLESS_TEST_SHELL_MAIN_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "content/public/app/content_main_delegate.h" 11 #include "content/public/app/content_main_delegate.h"
11 #include "content/shell/common/shell_content_client.h" 12 #include "content/shell/common/shell_content_client.h"
12 13
13 namespace content { 14 namespace content {
14 class ShellContentBrowserClient; 15 class ShellContentBrowserClient;
15 class ShellContentRendererClient; 16 class ShellContentRendererClient;
16 class ShellContentUtilityClient; 17 class ShellContentUtilityClient;
17 18
18 #if defined(OS_ANDROID) 19 class HeadlessShellMainDelegate : public ContentMainDelegate {
19 class BrowserMainRunner;
20 #endif
21
22 class ShellMainDelegate : public ContentMainDelegate {
23 public: 20 public:
24 ShellMainDelegate(); 21 HeadlessShellMainDelegate();
25 ~ShellMainDelegate() override; 22 ~HeadlessShellMainDelegate() override;
26 23
27 // ContentMainDelegate implementation: 24 // ContentMainDelegate implementation:
28 bool BasicStartupComplete(int* exit_code) override; 25 bool BasicStartupComplete(int* exit_code) override;
29 void PreSandboxStartup() override; 26 void PreSandboxStartup() override;
30 int RunProcess(const std::string& process_type, 27 int RunProcess(const std::string& process_type,
31 const MainFunctionParams& main_function_params) override; 28 const MainFunctionParams& main_function_params) override;
32 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
33 void ZygoteForked() override; 29 void ZygoteForked() override;
34 #endif
35 ContentBrowserClient* CreateContentBrowserClient() override; 30 ContentBrowserClient* CreateContentBrowserClient() override;
36 ContentRendererClient* CreateContentRendererClient() override; 31 ContentRendererClient* CreateContentRendererClient() override;
37 ContentUtilityClient* CreateContentUtilityClient() override; 32 ContentUtilityClient* CreateContentUtilityClient() override;
38 33
34 private:
39 static void InitializeResourceBundle(); 35 static void InitializeResourceBundle();
40 36
41 private:
42 scoped_ptr<ShellContentBrowserClient> browser_client_; 37 scoped_ptr<ShellContentBrowserClient> browser_client_;
43 scoped_ptr<ShellContentRendererClient> renderer_client_; 38 scoped_ptr<ShellContentRendererClient> renderer_client_;
44 scoped_ptr<ShellContentUtilityClient> utility_client_; 39 scoped_ptr<ShellContentUtilityClient> utility_client_;
45 ShellContentClient content_client_; 40 ShellContentClient content_client_;
46 41
47 #if defined(OS_ANDROID) 42 DISALLOW_COPY_AND_ASSIGN(HeadlessShellMainDelegate);
48 scoped_ptr<BrowserMainRunner> browser_runner_;
49 #endif
50
51 DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
52 }; 43 };
53 44
54 } // namespace content 45 } // namespace content
55 46
56 #endif // CONTENT_SHELL_APP_SHELL_MAIN_DELEGATE_H_ 47 #endif // CONTENT_SHELL_HEADLESS_HEADLESS_TEST_SHELL_MAIN_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698