| 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 // The Mac interface forwards most of these commands to the application layer, | 5 // The Mac interface forwards most of these commands to the application layer, |
| 6 // and I'm not really sure what to do about most of them. | 6 // and I'm not really sure what to do about most of them. |
| 7 | 7 |
| 8 #include "config.h" | 8 #include "config.h" |
| 9 | 9 |
| 10 #include "Document.h" | 10 #include "Document.h" |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 webkit_glue::StringToWebString(misspelled_word)); | 886 webkit_glue::StringToWebString(misspelled_word)); |
| 887 } | 887 } |
| 888 } | 888 } |
| 889 | 889 |
| 890 void EditorClientImpl::showSpellingUI(bool show) { | 890 void EditorClientImpl::showSpellingUI(bool show) { |
| 891 if (webview_->client()) | 891 if (webview_->client()) |
| 892 webview_->client()->showSpellingUI(show); | 892 webview_->client()->showSpellingUI(show); |
| 893 } | 893 } |
| 894 | 894 |
| 895 bool EditorClientImpl::spellingUIIsShowing() { | 895 bool EditorClientImpl::spellingUIIsShowing() { |
| 896 // SpellingPanel visibility is stored in the webview_ every time a toggle | 896 if (webview_->client()) |
| 897 // message is sent from the browser. If we were to send a message to the | 897 return webview_->client()->isShowingSpellingUI(); |
| 898 // browser and ask for the visibility, then we run into problems accessing | 898 return false; |
| 899 // cocoa methods on the UI thread. | |
| 900 return webview_->GetSpellingPanelVisibility(); | |
| 901 } | 899 } |
| 902 | 900 |
| 903 void EditorClientImpl::getGuessesForWord(const WebCore::String&, | 901 void EditorClientImpl::getGuessesForWord(const WebCore::String&, |
| 904 WTF::Vector<WebCore::String>& guesses)
{ | 902 WTF::Vector<WebCore::String>& guesses)
{ |
| 905 NOTIMPLEMENTED(); | 903 NOTIMPLEMENTED(); |
| 906 } | 904 } |
| 907 | 905 |
| 908 void EditorClientImpl::setInputMethodState(bool enabled) { | 906 void EditorClientImpl::setInputMethodState(bool enabled) { |
| 909 if (webview_->client()) | 907 if (webview_->client()) |
| 910 webview_->client()->setInputMethodEnabled(enabled); | 908 webview_->client()->setInputMethodEnabled(enabled); |
| 911 } | 909 } |
| OLD | NEW |