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

Unified Diff: headless/lib/browser/headless_browser_context_impl.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 side-by-side diff with in-line comments
Download patch
Index: headless/lib/browser/headless_browser_context_impl.h
diff --git a/headless/lib/browser/headless_browser_context.h b/headless/lib/browser/headless_browser_context_impl.h
similarity index 77%
rename from headless/lib/browser/headless_browser_context.h
rename to headless/lib/browser/headless_browser_context_impl.h
index 91bff6525f8dc400c487f05f857aac27e7c80a4b..e5d82d32f935675d01910f8972aed6fc5826fcda 100644
--- a/headless/lib/browser/headless_browser_context.h
+++ b/headless/lib/browser/headless_browser_context_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_
-#define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_
+#ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_
+#define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_
#include <memory>
@@ -13,14 +13,19 @@
#include "content/public/browser/resource_context.h"
#include "headless/lib/browser/headless_url_request_context_getter.h"
#include "headless/public/headless_browser.h"
+#include "headless/public/headless_browser_context.h"
namespace headless {
class HeadlessResourceContext;
-class HeadlessBrowserContext : public content::BrowserContext {
+class HeadlessBrowserContextImpl : public HeadlessBrowserContext,
+ public content::BrowserContext {
public:
- explicit HeadlessBrowserContext(HeadlessBrowser::Options* options);
- ~HeadlessBrowserContext() override;
+ explicit HeadlessBrowserContextImpl(HeadlessBrowser::Options* options);
+ ~HeadlessBrowserContextImpl() override;
+
+ static HeadlessBrowserContextImpl* From(
+ HeadlessBrowserContext* browser_context);
// BrowserContext implementation:
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
@@ -52,7 +57,7 @@ class HeadlessBrowserContext : public content::BrowserContext {
void SetOptionsForTesting(HeadlessBrowser::Options* options);
private:
- // Performs initialization of the HeadlessBrowserContext while IO is still
+ // Performs initialization of the HeadlessBrowserContextImpl while IO is still
// allowed on the current thread.
void InitWhileIOAllowed();
@@ -60,9 +65,9 @@ class HeadlessBrowserContext : public content::BrowserContext {
std::unique_ptr<HeadlessResourceContext> resource_context_;
HeadlessBrowser::Options* options_; // Not owned.
- DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContext);
+ DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContextImpl);
};
} // namespace headless
-#endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_
+#endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_IMPL_H_
« no previous file with comments | « headless/lib/browser/headless_browser_context.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