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

Side by Side Diff: content/shell/renderer/test_runner/SpellCheckClient.cpp

Issue 264003003: test_runner: Move everything else into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/renderer/test_runner/SpellCheckClient.h" 5 #include "content/shell/renderer/test_runner/SpellCheckClient.h"
6 6
7 #include "content/shell/renderer/test_runner/MockGrammarCheck.h" 7 #include "content/shell/renderer/test_runner/MockGrammarCheck.h"
8 #include "content/shell/renderer/test_runner/WebTestDelegate.h" 8 #include "content/shell/renderer/test_runner/WebTestDelegate.h"
9 #include "content/shell/renderer/test_runner/WebTestProxy.h" 9 #include "content/shell/renderer/test_runner/WebTestProxy.h"
10 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h" 10 #include "third_party/WebKit/public/web/WebTextCheckingCompletion.h"
11 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" 11 #include "third_party/WebKit/public/web/WebTextCheckingResult.h"
12 12
13 using namespace WebTestRunner;
14 using namespace blink; 13 using namespace blink;
15 using namespace std; 14 using namespace std;
16 15
17 namespace content { 16 namespace content {
18 17
19 namespace { 18 namespace {
20 19
21 class HostMethodTask : public WebMethodTask<SpellCheckClient> { 20 class HostMethodTask : public WebMethodTask<SpellCheckClient> {
22 public: 21 public:
23 typedef void (SpellCheckClient::*CallbackMethodType)(); 22 typedef void (SpellCheckClient::*CallbackMethodType)();
24 HostMethodTask(SpellCheckClient* object, CallbackMethodType callback) 23 HostMethodTask(SpellCheckClient* object, CallbackMethodType callback)
25 : WebMethodTask<SpellCheckClient>(object) 24 : WebMethodTask<SpellCheckClient>(object)
26 , m_callback(callback) 25 , m_callback(callback)
27 { } 26 { }
28 27
29 virtual void runIfValid() OVERRIDE { (m_object->*m_callback)(); } 28 virtual void runIfValid() OVERRIDE { (m_object->*m_callback)(); }
30 29
31 private: 30 private:
32 CallbackMethodType m_callback; 31 CallbackMethodType m_callback;
33 }; 32 };
34 33
35 } 34 } // namespace
36 35
37 SpellCheckClient::SpellCheckClient(WebTestProxyBase* webTestProxy) 36 SpellCheckClient::SpellCheckClient(WebTestProxyBase* webTestProxy)
38 : m_lastRequestedTextCheckingCompletion(0) 37 : m_lastRequestedTextCheckingCompletion(0)
39 , m_webTestProxy(webTestProxy) 38 , m_webTestProxy(webTestProxy)
40 { 39 {
41 } 40 }
42 41
43 SpellCheckClient::~SpellCheckClient() 42 SpellCheckClient::~SpellCheckClient()
44 { 43 {
45 } 44 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 WebString SpellCheckClient::autoCorrectWord(const WebString&) 134 WebString SpellCheckClient::autoCorrectWord(const WebString&)
136 { 135 {
137 // Returns an empty string as Mac WebKit ('WebKitSupport/WebEditorClient.mm' ) 136 // Returns an empty string as Mac WebKit ('WebKitSupport/WebEditorClient.mm' )
138 // does. (If this function returns a non-empty string, WebKit replaces the 137 // does. (If this function returns a non-empty string, WebKit replaces the
139 // given misspelled string with the result one. This process executes some 138 // given misspelled string with the result one. This process executes some
140 // editor commands and causes layout-test failures.) 139 // editor commands and causes layout-test failures.)
141 return WebString(); 140 return WebString();
142 } 141 }
143 142
144 } // namespace content 143 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/SpellCheckClient.h ('k') | content/shell/renderer/test_runner/TestCommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698