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

Side by Side Diff: headless/public/headless_browser_context.h

Issue 2043603004: headless: Introduce a browser context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 6 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 | « headless/public/headless_browser.cc ('k') | headless/public/headless_web_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_
6 #define HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_
7
8 #include "headless/public/headless_export.h"
9
10 namespace headless {
11 class HeadlessBrowserImpl;
12
13 // Represents an isolated session with a unique cache, cookies, and other
14 // profile/session related data.
15 class HEADLESS_EXPORT HeadlessBrowserContext {
16 public:
17 class Builder;
18
19 virtual ~HeadlessBrowserContext() {}
20
21 // TODO(skyostil): Allow saving and restoring contexts (crbug.com/617931).
22
23 protected:
24 HeadlessBrowserContext() {}
25
26 private:
27 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContext);
28 };
29
30 class HEADLESS_EXPORT HeadlessBrowserContext::Builder {
31 public:
32 Builder(Builder&&);
33 ~Builder();
34
35 // TODO(skyostil): Allow overriding protocol handlers.
36
37 std::unique_ptr<HeadlessBrowserContext> Build();
38
39 private:
40 friend class HeadlessBrowserImpl;
41
42 explicit Builder(HeadlessBrowserImpl* browser);
43
44 HeadlessBrowserImpl* browser_;
45
46 DISALLOW_COPY_AND_ASSIGN(Builder);
47 };
48
49 } // namespace headless
50
51 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « headless/public/headless_browser.cc ('k') | headless/public/headless_web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698