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

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

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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_H_ 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_
6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_ 6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "content/public/browser/browser_context.h" 11 #include "content/public/browser/browser_context.h"
12 #include "content/public/browser/content_browser_client.h" 12 #include "content/public/browser/content_browser_client.h"
13 #include "content/public/browser/resource_context.h" 13 #include "content/public/browser/resource_context.h"
14 #include "headless/lib/browser/headless_url_request_context_getter.h" 14 #include "headless/lib/browser/headless_url_request_context_getter.h"
15 #include "headless/public/headless_browser.h" 15 #include "headless/public/headless_browser.h"
16 16
17 namespace headless { 17 namespace headless {
18 class HeadlessResourceContext; 18 class HeadlessResourceContext;
19 19
20 class HeadlessBrowserContext : public content::BrowserContext { 20 class HeadlessBrowserContext : public content::BrowserContext {
21 public: 21 public:
22 explicit HeadlessBrowserContext(const HeadlessBrowser::Options& options); 22 explicit HeadlessBrowserContext(const HeadlessBrowser::Options& options);
23 ~HeadlessBrowserContext() override; 23 ~HeadlessBrowserContext() override;
24 24
25 // BrowserContext implementation: 25 // BrowserContext implementation:
26 std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate( 26 std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
27 const base::FilePath& partition_path) override; 27 const base::FilePath& partition_path) override;
28 base::FilePath GetPath() const override; 28 base::FilePath GetPath() const override;
29 bool IsOffTheRecord() const override; 29 bool IsOffTheRecord() const override;
30 net::URLRequestContextGetter* GetRequestContext() override;
31 net::URLRequestContextGetter* GetMediaRequestContext() override; 30 net::URLRequestContextGetter* GetMediaRequestContext() override;
32 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 31 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
33 int renderer_child_id) override; 32 int renderer_child_id) override;
34 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( 33 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
35 const base::FilePath& partition_path, 34 const base::FilePath& partition_path,
36 bool in_memory) override; 35 bool in_memory) override;
37 content::ResourceContext* GetResourceContext() override; 36 content::ResourceContext* GetResourceContext() override;
38 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; 37 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
39 content::BrowserPluginGuestManager* GetGuestManager() override; 38 content::BrowserPluginGuestManager* GetGuestManager() override;
40 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; 39 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
(...skipping 21 matching lines...) Expand all
62 base::FilePath path_; 61 base::FilePath path_;
63 std::unique_ptr<HeadlessResourceContext> resource_context_; 62 std::unique_ptr<HeadlessResourceContext> resource_context_;
64 HeadlessBrowser::Options options_; 63 HeadlessBrowser::Options options_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContext); 65 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContext);
67 }; 66 };
68 67
69 } // namespace headless 68 } // namespace headless
70 69
71 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_ 70 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_oauth2_token_service_delegate.cc ('k') | headless/lib/browser/headless_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698