| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "ContextMenu.h" | 10 #include "ContextMenu.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 frame_type = GetTypeAndURLFromFrame(selected_frame, | 177 frame_type = GetTypeAndURLFromFrame(selected_frame, |
| 178 &frame_url, | 178 &frame_url, |
| 179 ContextNode::FRAME); | 179 ContextNode::FRAME); |
| 180 frame_encoding = webkit_glue::StringToStdWString( | 180 frame_encoding = webkit_glue::StringToStdWString( |
| 181 selected_frame->loader()->encoding()); | 181 selected_frame->loader()->encoding()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 if (type == ContextNode::NONE) { | 184 if (type == ContextNode::NONE) { |
| 185 if (r.isContentEditable()) { | 185 if (r.isContentEditable()) { |
| 186 type = ContextNode::EDITABLE; | 186 type = ContextNode::EDITABLE; |
| 187 if (webview_->FocusedFrameNeedsSpellchecking()) { | 187 if (webview_->GetFocusedWebCoreFrame()->editor()-> |
| 188 isContinuousSpellCheckingEnabled()) { |
| 188 misspelled_word_string = GetMisspelledWord(default_menu, | 189 misspelled_word_string = GetMisspelledWord(default_menu, |
| 189 selected_frame); | 190 selected_frame); |
| 190 } | 191 } |
| 191 } else if (r.isSelected()) { | 192 } else if (r.isSelected()) { |
| 192 type = ContextNode::SELECTION; | 193 type = ContextNode::SELECTION; |
| 193 selection_text_string = | 194 selection_text_string = |
| 194 CollapseWhitespace( | 195 CollapseWhitespace( |
| 195 webkit_glue::StringToStdWString(selected_frame->selectedText()), | 196 webkit_glue::StringToStdWString(selected_frame->selectedText()), |
| 196 false); | 197 false); |
| 197 } else if (selected_frame != webview_->main_frame()->frame()) { | 198 } else if (selected_frame != webview_->main_frame()->frame()) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 271 |
| 271 bool ContextMenuClientImpl::shouldIncludeInspectElementItem() { | 272 bool ContextMenuClientImpl::shouldIncludeInspectElementItem() { |
| 272 return false; // TODO(jackson): Eventually include the inspector context me
nu item | 273 return false; // TODO(jackson): Eventually include the inspector context me
nu item |
| 273 } | 274 } |
| 274 | 275 |
| 275 #if defined(OS_MACOSX) | 276 #if defined(OS_MACOSX) |
| 276 void ContextMenuClientImpl::searchWithSpotlight() { | 277 void ContextMenuClientImpl::searchWithSpotlight() { |
| 277 // TODO(pinkerton): write this | 278 // TODO(pinkerton): write this |
| 278 } | 279 } |
| 279 #endif | 280 #endif |
| OLD | NEW |