Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: Source/web/SpellCheckerClientImpl.cpp

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/SpellCheckerClientImpl.h ('k') | Source/web/StorageClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 20 matching lines...) Expand all
31 #include "core/editing/Editor.h" 31 #include "core/editing/Editor.h"
32 #include "core/editing/SpellChecker.h" 32 #include "core/editing/SpellChecker.h"
33 #include "core/frame/LocalFrame.h" 33 #include "core/frame/LocalFrame.h"
34 #include "core/frame/Settings.h" 34 #include "core/frame/Settings.h"
35 #include "core/page/Page.h" 35 #include "core/page/Page.h"
36 #include "public/web/WebSpellCheckClient.h" 36 #include "public/web/WebSpellCheckClient.h"
37 #include "public/web/WebTextCheckingResult.h" 37 #include "public/web/WebTextCheckingResult.h"
38 #include "web/WebTextCheckingCompletionImpl.h" 38 #include "web/WebTextCheckingCompletionImpl.h"
39 #include "web/WebViewImpl.h" 39 #include "web/WebViewImpl.h"
40 40
41 using namespace WebCore; 41 using namespace blink;
42 42
43 namespace blink { 43 namespace blink {
44 44
45 SpellCheckerClientImpl::SpellCheckerClientImpl(WebViewImpl* webview) 45 SpellCheckerClientImpl::SpellCheckerClientImpl(WebViewImpl* webview)
46 : m_webView(webview) 46 : m_webView(webview)
47 , m_spellCheckThisFieldStatus(SpellCheckAutomatic) 47 , m_spellCheckThisFieldStatus(SpellCheckAutomatic)
48 { 48 {
49 } 49 }
50 50
51 SpellCheckerClientImpl::~SpellCheckerClientImpl() 51 SpellCheckerClientImpl::~SpellCheckerClientImpl()
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 // Note: the Mac code checks if the pointers are null before writing to them , 146 // Note: the Mac code checks if the pointers are null before writing to them ,
147 // so we do too. 147 // so we do too.
148 if (misspellingLocation) 148 if (misspellingLocation)
149 *misspellingLocation = spellLocation; 149 *misspellingLocation = spellLocation;
150 if (misspellingLength) 150 if (misspellingLength)
151 *misspellingLength = spellLength; 151 *misspellingLength = spellLength;
152 } 152 }
153 153
154 void SpellCheckerClientImpl::requestCheckingOfString(WTF::PassRefPtr<WebCore::Te xtCheckingRequest> request) 154 void SpellCheckerClientImpl::requestCheckingOfString(WTF::PassRefPtr<blink::Text CheckingRequest> request)
155 { 155 {
156 if (m_webView->spellCheckClient()) { 156 if (m_webView->spellCheckClient()) {
157 const String& text = request->data().text(); 157 const String& text = request->data().text();
158 const Vector<uint32_t>& markers = request->data().markers(); 158 const Vector<uint32_t>& markers = request->data().markers();
159 const Vector<unsigned>& markerOffsets = request->data().offsets(); 159 const Vector<unsigned>& markerOffsets = request->data().offsets();
160 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, mark erOffsets, new WebTextCheckingCompletionImpl(request)); 160 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, mark erOffsets, new WebTextCheckingCompletionImpl(request));
161 } 161 }
162 } 162 }
163 163
164 String SpellCheckerClientImpl::getAutoCorrectSuggestionForMisspelledWord(const S tring& misspelledWord) 164 String SpellCheckerClientImpl::getAutoCorrectSuggestionForMisspelledWord(const S tring& misspelledWord)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 bool SpellCheckerClientImpl::spellingUIIsShowing() 228 bool SpellCheckerClientImpl::spellingUIIsShowing()
229 { 229 {
230 if (m_webView->spellCheckClient()) 230 if (m_webView->spellCheckClient())
231 return m_webView->spellCheckClient()->isShowingSpellingUI(); 231 return m_webView->spellCheckClient()->isShowingSpellingUI();
232 return false; 232 return false;
233 } 233 }
234 234
235 } // namesace WebKit 235 } // namesace WebKit
OLDNEW
« no previous file with comments | « Source/web/SpellCheckerClientImpl.h ('k') | Source/web/StorageClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698