#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
#include "content/public/common/context_menu_params.h"
#include "extensions/browser/view_type_utils.h"
#include "grit/generated_resources.h"
proxy_->AddMenuItem(IDC_SPELLCHECK_ADD_TO_DICTIONARY,
l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY));
-#if defined(TOOLKIT_GTK)
- extensions::ViewType view_type =
- extensions::GetViewType(proxy_->GetWebContents());
- if (view_type != extensions::VIEW_TYPE_PANEL) {
-#endif
- proxy_->AddCheckItem(IDC_CONTENT_CONTEXT_SPELLING_TOGGLE,
- l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE));
-#if defined(TOOLKIT_GTK)
- }
-#endif
+ proxy_->AddCheckItem(IDC_CONTENT_CONTEXT_SPELLING_TOGGLE,
+ l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE));
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kEnableSpellingAutoCorrect)) {
if (command_id >= IDC_SPELLCHECK_SUGGESTION_0 &&
command_id <= IDC_SPELLCHECK_SUGGESTION_LAST) {
int suggestion_index = command_id - IDC_SPELLCHECK_SUGGESTION_0;
- proxy_->GetRenderViewHost()->ReplaceMisspelling(
+ proxy_->GetWebContents()->ReplaceMisspelling(
suggestions_[suggestion_index]);
// GetSpellCheckHost() can return null when the suggested word is provided
// by Web SpellCheck API.
// the misspelled word with the suggestion and add it to our custom-word
// dictionary so this word is not marked as misspelled any longer.
if (command_id == IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION) {
- proxy_->GetRenderViewHost()->ReplaceMisspelling(result_);
+ proxy_->GetWebContents()->ReplaceMisspelling(result_);
misspelled_word_ = result_;
}
gfx::Rect rect = rvh->GetView()->GetViewBounds();
chrome::ShowConfirmBubble(
#if defined(TOOLKIT_VIEWS)
- proxy_->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
+ proxy_->GetWebContents()->GetTopLevelNativeWindow(),
#else
rvh->GetView()->GetNativeView(),
#endif