Dave Tapuska | 39f76085 | 2023-12-08 03:33:57 | [diff] [blame] | 1 | // Copyright 2023 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_SPELLCHECKER_SPELL_CHECK_INITIALIZATION_HOST_IMPL_H_ |
| 6 | #define CHROME_BROWSER_SPELLCHECKER_SPELL_CHECK_INITIALIZATION_HOST_IMPL_H_ |
| 7 | |
| 8 | #include "components/spellcheck/common/spellcheck.mojom.h" |
| 9 | #include "mojo/public/cpp/bindings/pending_receiver.h" |
| 10 | |
| 11 | // Implementation of SpellCheckHost involving Chrome-only features. |
| 12 | class SpellCheckInitializationHostImpl |
| 13 | : public spellcheck::mojom::SpellCheckInitializationHost { |
| 14 | public: |
| 15 | explicit SpellCheckInitializationHostImpl(int render_process_id); |
| 16 | |
| 17 | SpellCheckInitializationHostImpl(const SpellCheckInitializationHostImpl&) = |
| 18 | delete; |
| 19 | SpellCheckInitializationHostImpl& operator=( |
| 20 | const SpellCheckInitializationHostImpl&) = delete; |
| 21 | |
| 22 | ~SpellCheckInitializationHostImpl() override; |
| 23 | |
| 24 | static void Create( |
| 25 | int render_process_id, |
| 26 | mojo::PendingReceiver<spellcheck::mojom::SpellCheckInitializationHost> |
| 27 | receiver); |
| 28 | |
| 29 | private: |
| 30 | // spellcheck::mojom::SpellCheckInitializationHost: |
| 31 | void RequestDictionary() override; |
| 32 | |
| 33 | // The process ID of the renderer. |
| 34 | const int render_process_id_; |
| 35 | }; |
| 36 | |
| 37 | #endif // CHROME_BROWSER_SPELLCHECKER_SPELL_CHECK_INITIALIZATION_HOST_IMPL_H_ |