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

Side by Side Diff: headless/lib/browser/headless_browser_context_impl.h

Issue 2374063002: Headless: expose WebPreferences to embedder, add --hide-scrollbars. (Closed)
Patch Set: Address comments, add test. Created 4 years, 2 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_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_ 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_
6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_ 6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 13 matching lines...) Expand all
24 class HeadlessResourceContext; 24 class HeadlessResourceContext;
25 class HeadlessWebContentsImpl; 25 class HeadlessWebContentsImpl;
26 26
27 class HeadlessBrowserContextImpl : public HeadlessBrowserContext, 27 class HeadlessBrowserContextImpl : public HeadlessBrowserContext,
28 public content::BrowserContext { 28 public content::BrowserContext {
29 public: 29 public:
30 ~HeadlessBrowserContextImpl() override; 30 ~HeadlessBrowserContextImpl() override;
31 31
32 static HeadlessBrowserContextImpl* From( 32 static HeadlessBrowserContextImpl* From(
33 HeadlessBrowserContext* browser_context); 33 HeadlessBrowserContext* browser_context);
34 static HeadlessBrowserContextImpl* From(
35 content::BrowserContext* browser_context);
34 36
35 static std::unique_ptr<HeadlessBrowserContextImpl> Create( 37 static std::unique_ptr<HeadlessBrowserContextImpl> Create(
36 HeadlessBrowserContext::Builder* builder); 38 HeadlessBrowserContext::Builder* builder);
37 39
38 // HeadlessBrowserContext implementation: 40 // HeadlessBrowserContext implementation:
39 HeadlessWebContents::Builder CreateWebContentsBuilder() override; 41 HeadlessWebContents::Builder CreateWebContentsBuilder() override;
40 std::vector<HeadlessWebContents*> GetAllWebContents() override; 42 std::vector<HeadlessWebContents*> GetAllWebContents() override;
41 HeadlessWebContents* GetWebContentsForDevToolsAgentHostId( 43 HeadlessWebContents* GetWebContentsForDevToolsAgentHostId(
42 const std::string& devtools_agent_host_id) override; 44 const std::string& devtools_agent_host_id) override;
43 void Close() override; 45 void Close() override;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 web_contents_map_; 99 web_contents_map_;
98 100
99 std::string id_; 101 std::string id_;
100 102
101 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContextImpl); 103 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContextImpl);
102 }; 104 };
103 105
104 } // namespace headless 106 } // namespace headless
105 107
106 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_ 108 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « headless/app/headless_shell_switches.cc ('k') | headless/lib/browser/headless_browser_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698