msiem | adbabe3 | 2025-02-11 21:16:57 | [diff] [blame] | 1 | // Copyright 2025 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_WEB_APPLICATIONS_NAVIGATION_CAPTURING_SETTINGS_IMPL_H_ |
| 6 | #define CHROME_BROWSER_WEB_APPLICATIONS_NAVIGATION_CAPTURING_SETTINGS_IMPL_H_ |
| 7 | |
| 8 | #include "base/memory/raw_ref.h" |
| 9 | #include "chrome/browser/web_applications/navigation_capturing_settings.h" |
| 10 | |
| 11 | class Profile; |
| 12 | |
| 13 | namespace web_app { |
| 14 | |
| 15 | // This is created in the `NavigationCapturingSettings::Create` method, called |
| 16 | // in `NavigationCapturingProcess`. |
| 17 | // |
| 18 | // Windows, Mac, and Linux queries through the WebAppRegistrar to store the |
| 19 | // preferred application to capturing navigations given a url. |
| 20 | class NavigationCapturingSettingsImpl : public NavigationCapturingSettings { |
| 21 | public: |
| 22 | explicit NavigationCapturingSettingsImpl(Profile& profile); |
| 23 | ~NavigationCapturingSettingsImpl() override; |
| 24 | NavigationCapturingSettingsImpl(const NavigationCapturingSettingsImpl&) = |
| 25 | delete; |
| 26 | NavigationCapturingSettingsImpl& operator=( |
| 27 | const NavigationCapturingSettingsImpl&) = delete; |
| 28 | |
| 29 | std::optional<webapps::AppId> GetCapturingWebAppForUrl( |
| 30 | const GURL& url) override; |
| 31 | |
| 32 | private: |
| 33 | raw_ref<Profile> profile_; |
| 34 | }; |
| 35 | |
| 36 | } // namespace web_app |
| 37 | |
| 38 | #endif // CHROME_BROWSER_WEB_APPLICATIONS_NAVIGATION_CAPTURING_SETTINGS_IMPL_H_ |