| 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_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define HEADLESS_LIB_BROWSER_HEADLESS_CONTENT_BROWSER_CLIENT_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_CONTENT_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/content_browser_client.h" | 8 #include "content/public/browser/content_browser_client.h" |
| 9 #include "headless/lib/browser/headless_resource_dispatcher_host_delegate.h" |
| 9 | 10 |
| 10 namespace headless { | 11 namespace headless { |
| 11 | 12 |
| 12 class HeadlessBrowserImpl; | 13 class HeadlessBrowserImpl; |
| 13 | 14 |
| 14 class HeadlessContentBrowserClient : public content::ContentBrowserClient { | 15 class HeadlessContentBrowserClient : public content::ContentBrowserClient { |
| 15 public: | 16 public: |
| 16 explicit HeadlessContentBrowserClient(HeadlessBrowserImpl* browser); | 17 explicit HeadlessContentBrowserClient(HeadlessBrowserImpl* browser); |
| 17 ~HeadlessContentBrowserClient() override; | 18 ~HeadlessContentBrowserClient() override; |
| 18 | 19 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 30 const storage::OptionalQuotaSettingsCallback& callback) override; | 31 const storage::OptionalQuotaSettingsCallback& callback) override; |
| 31 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 32 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 32 void GetAdditionalMappedFilesForChildProcess( | 33 void GetAdditionalMappedFilesForChildProcess( |
| 33 const base::CommandLine& command_line, | 34 const base::CommandLine& command_line, |
| 34 int child_process_id, | 35 int child_process_id, |
| 35 content::FileDescriptorInfo* mappings) override; | 36 content::FileDescriptorInfo* mappings) override; |
| 36 #endif | 37 #endif |
| 37 void AppendExtraCommandLineSwitches(base::CommandLine* command_line, | 38 void AppendExtraCommandLineSwitches(base::CommandLine* command_line, |
| 38 int child_process_id) override; | 39 int child_process_id) override; |
| 39 | 40 |
| 41 void ResourceDispatcherHostCreated() override; |
| 42 |
| 40 private: | 43 private: |
| 41 HeadlessBrowserImpl* browser_; // Not owned. | 44 HeadlessBrowserImpl* browser_; // Not owned. |
| 42 | 45 |
| 46 std::unique_ptr<HeadlessResourceDispatcherHostDelegate> |
| 47 resource_dispatcher_host_delegate_; |
| 48 |
| 43 DISALLOW_COPY_AND_ASSIGN(HeadlessContentBrowserClient); | 49 DISALLOW_COPY_AND_ASSIGN(HeadlessContentBrowserClient); |
| 44 }; | 50 }; |
| 45 | 51 |
| 46 } // namespace headless | 52 } // namespace headless |
| 47 | 53 |
| 48 #endif // HEADLESS_LIB_BROWSER_HEADLESS_CONTENT_BROWSER_CLIENT_H_ | 54 #endif // HEADLESS_LIB_BROWSER_HEADLESS_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |