Further improvements to spell checking support (issue #137).

- Add "Add to dictionary" context menu option.
- Use available translations for "Add to dictionary" and "No spelling suggestions".
- Fix placement of context menu separators.
- Display the "No spelling suggestions" option as grayed out.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1879 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-10-19 01:47:27 +00:00
parent a20b5cc88d
commit ff77107e73
10 changed files with 110 additions and 14 deletions

View File

@ -434,6 +434,23 @@ void CEF_CALLBACK browser_host_replace_misspelling(
CefString(word));
}
void CEF_CALLBACK browser_host_add_word_to_dictionary(
struct _cef_browser_host_t* self, const cef_string_t* word) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: word; type: string_byref_const
DCHECK(word);
if (!word)
return;
// Execute
CefBrowserHostCppToC::Get(self)->AddWordToDictionary(
CefString(word));
}
int CEF_CALLBACK browser_host_is_window_rendering_disabled(
struct _cef_browser_host_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -806,6 +823,7 @@ CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
struct_.struct_.is_mouse_cursor_change_disabled =
browser_host_is_mouse_cursor_change_disabled;
struct_.struct_.replace_misspelling = browser_host_replace_misspelling;
struct_.struct_.add_word_to_dictionary = browser_host_add_word_to_dictionary;
struct_.struct_.is_window_rendering_disabled =
browser_host_is_window_rendering_disabled;
struct_.struct_.was_resized = browser_host_was_resized;