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

Side by Side Diff: third_party/WebKit/Source/web/WebTextCheckingCompletionImpl.cpp

Issue 2870773003: Move EditorClientImpl.cpp out of web/ to core/page/EditorClient.cpp (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "web/WebTextCheckingCompletionImpl.h" 31 #include "web/WebTextCheckingCompletionImpl.h"
32 32
33 #include "platform/text/TextCheckerClient.h" 33 #include "platform/text/TextCheckerClient.h"
34 #include "platform/wtf/Assertions.h" 34 #include "platform/wtf/Assertions.h"
35 #include "public/platform/WebVector.h" 35 #include "public/platform/WebVector.h"
36 #include "public/web/WebTextCheckingResult.h" 36 #include "public/web/WebTextCheckingResult.h"
37 #include "web/EditorClientImpl.h"
38 37
39 namespace blink { 38 namespace blink {
40 39
41 static Vector<TextCheckingResult> ToCoreResults( 40 static Vector<TextCheckingResult> ToCoreResults(
42 const WebVector<WebTextCheckingResult>& results) { 41 const WebVector<WebTextCheckingResult>& results) {
43 Vector<TextCheckingResult> core_results; 42 Vector<TextCheckingResult> core_results;
44 for (size_t i = 0; i < results.size(); ++i) 43 for (size_t i = 0; i < results.size(); ++i)
45 core_results.push_back(results[i]); 44 core_results.push_back(results[i]);
46 return core_results; 45 return core_results;
47 } 46 }
48 47
49 void WebTextCheckingCompletionImpl::DidFinishCheckingText( 48 void WebTextCheckingCompletionImpl::DidFinishCheckingText(
50 const WebVector<WebTextCheckingResult>& results) { 49 const WebVector<WebTextCheckingResult>& results) {
51 request_->DidSucceed(ToCoreResults(results)); 50 request_->DidSucceed(ToCoreResults(results));
52 delete this; 51 delete this;
53 } 52 }
54 53
55 void WebTextCheckingCompletionImpl::DidCancelCheckingText() { 54 void WebTextCheckingCompletionImpl::DidCancelCheckingText() {
56 request_->DidCancel(); 55 request_->DidCancel();
57 delete this; 56 delete this;
58 } 57 }
59 58
60 } // namespace blink 59 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698