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

Side by Side Diff: content/shell/renderer/test_runner/MockWebSpeechRecognizer.h

Issue 279403006: Update WebFrameTestProxy and WebTestProxy to mostly follow Chrome style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE 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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_ 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_ 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 virtual void abort(const blink::WebSpeechRecognitionHandle&, blink::WebSpeec hRecognizerClient*) OVERRIDE; 36 virtual void abort(const blink::WebSpeechRecognitionHandle&, blink::WebSpeec hRecognizerClient*) OVERRIDE;
37 37
38 // Methods accessed by layout tests: 38 // Methods accessed by layout tests:
39 void addMockResult(const blink::WebString& transcript, float confidence); 39 void addMockResult(const blink::WebString& transcript, float confidence);
40 void setError(const blink::WebString& error, const blink::WebString& message ); 40 void setError(const blink::WebString& error, const blink::WebString& message );
41 bool wasAborted() const { return m_wasAborted; } 41 bool wasAborted() const { return m_wasAborted; }
42 42
43 // Methods accessed from Task objects: 43 // Methods accessed from Task objects:
44 blink::WebSpeechRecognizerClient* client() { return m_client; } 44 blink::WebSpeechRecognizerClient* client() { return m_client; }
45 blink::WebSpeechRecognitionHandle& handle() { return m_handle; } 45 blink::WebSpeechRecognitionHandle& handle() { return m_handle; }
46 WebTaskList* taskList() { return &m_taskList; } 46 WebTaskList* mutable_task_list() { return &m_taskList; }
47 47
48 class Task { 48 class Task {
49 public: 49 public:
50 Task(MockWebSpeechRecognizer* recognizer) : m_recognizer(recognizer) { } 50 Task(MockWebSpeechRecognizer* recognizer) : m_recognizer(recognizer) { }
51 virtual ~Task() { } 51 virtual ~Task() { }
52 virtual void run() = 0; 52 virtual void run() = 0;
53 protected: 53 protected:
54 MockWebSpeechRecognizer* m_recognizer; 54 MockWebSpeechRecognizer* m_recognizer;
55 }; 55 };
56 56
(...skipping 20 matching lines...) Expand all
77 StepTask(MockWebSpeechRecognizer* object) : WebMethodTask<MockWebSpeechR ecognizer>(object) { } 77 StepTask(MockWebSpeechRecognizer* object) : WebMethodTask<MockWebSpeechR ecognizer>(object) { }
78 virtual void runIfValid() OVERRIDE; 78 virtual void runIfValid() OVERRIDE;
79 }; 79 };
80 80
81 DISALLOW_COPY_AND_ASSIGN(MockWebSpeechRecognizer); 81 DISALLOW_COPY_AND_ASSIGN(MockWebSpeechRecognizer);
82 }; 82 };
83 83
84 } // namespace content 84 } // namespace content
85 85
86 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_ 86 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698