| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |