spellcheck_panel.mojom 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. module spellcheck.mojom;
  5. import "mojo/public/mojom/base/string16.mojom";
  6. // Render frame interface exposed to the browser for sending messages when
  7. // the OSX BUILDFLAG(HAS_SPELLCHECK_PANEL) spelling and grammar checking
  8. // panel is active. The browser selects the currently focused render frame
  9. // and sends the following messages to that frame.
  10. //
  11. interface SpellCheckPanel {
  12. // Informs the focused renderer frame if the OSX spelling and grammar
  13. // checking panel is visible or not.
  14. ToggleSpellPanel(bool visible);
  15. // Tells the focused renderer frame to advance to the next misspelling.
  16. // Sent when the user clicks the "Find Next" button on the OSX spelling
  17. // and grammar checking panel.
  18. AdvanceToNextMisspelling();
  19. };
  20. // Browser process interface exposed to the renderer for requesting spell-
  21. // check panel host services when the OSX BUILDFLAG(HAS_SPELLCHECK_PANEL)
  22. // spelling and grammar checking panel is active.
  23. //
  24. interface SpellCheckPanelHost {
  25. // Tells the browser to display (or not display) the OSX spelling panel.
  26. ShowSpellingPanel(bool show);
  27. // Tells the browser to update the spelling panel with the given |word|.
  28. UpdateSpellingPanelWithMisspelledWord(mojo_base.mojom.String16 word);
  29. };