Avi Drissman | 8ba1bad | 2022-09-13 19:22:36 | [diff] [blame] | 1 | // Copyright 2020 The Chromium Authors |
Shakti Sahu | b9f0b50 | 2020-08-18 22:21:10 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Shakti Sahu | 9c215b93 | 2020-08-20 00:42:55 | [diff] [blame] | 5 | #ifndef COMPONENTS_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_ |
| 6 | #define COMPONENTS_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_ |
Shakti Sahu | b9f0b50 | 2020-08-18 22:21:10 | [diff] [blame] | 7 | |
Shakti Sahu | b9f0b50 | 2020-08-18 22:21:10 | [diff] [blame] | 8 | namespace content { |
| 9 | class WebContents; |
| 10 | } // namespace content |
| 11 | |
| 12 | namespace thin_webview { |
| 13 | namespace android { |
| 14 | |
| 15 | // A helper class to help in attaching tab helpers. |
| 16 | class ThinWebViewInitializer { |
| 17 | public: |
| 18 | static void SetInstance(ThinWebViewInitializer* instance); |
| 19 | static ThinWebViewInitializer* GetInstance(); |
| 20 | |
| 21 | ThinWebViewInitializer() = default; |
Peter Boström | 09c0182 | 2021-09-20 22:43:27 | [diff] [blame] | 22 | |
| 23 | ThinWebViewInitializer(const ThinWebViewInitializer&) = delete; |
| 24 | ThinWebViewInitializer& operator=(const ThinWebViewInitializer&) = delete; |
| 25 | |
Shakti Sahu | b9f0b50 | 2020-08-18 22:21:10 | [diff] [blame] | 26 | ~ThinWebViewInitializer() = default; |
| 27 | |
| 28 | virtual void AttachTabHelpers(content::WebContents* web_contents) = 0; |
Shakti Sahu | b9f0b50 | 2020-08-18 22:21:10 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | } // namespace android |
| 32 | } // namespace thin_webview |
| 33 | |
Shakti Sahu | 9c215b93 | 2020-08-20 00:42:55 | [diff] [blame] | 34 | #endif // COMPONENTS_THIN_WEBVIEW_THIN_WEBVIEW_INITIALIZER_H_ |