209382817961960b994eac1de1eeb74f9f06c750
[platform/framework/web/crosswalk.git] / src / content / shell / renderer / test_runner / WebUserMediaClientMock.h
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBUSERMEDIACLIENTMOCK_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBUSERMEDIACLIENTMOCK_H_
7
8 #include "base/basictypes.h"
9 #include "content/shell/renderer/test_runner/TestCommon.h"
10 #include "content/shell/renderer/test_runner/WebTask.h"
11 #include "third_party/WebKit/public/platform/WebCommon.h"
12 #include "third_party/WebKit/public/platform/WebString.h"
13 #include "third_party/WebKit/public/platform/WebURL.h"
14 #include "third_party/WebKit/public/web/WebUserMediaClient.h"
15
16 namespace WebTestRunner {
17
18 class WebTestDelegate;
19
20 class WebUserMediaClientMock : public blink::WebUserMediaClient {
21 public:
22     explicit WebUserMediaClientMock(WebTestDelegate*);
23     virtual ~WebUserMediaClientMock() { }
24
25     virtual void requestUserMedia(const blink::WebUserMediaRequest&) OVERRIDE;
26     virtual void cancelUserMediaRequest(const blink::WebUserMediaRequest&) OVERRIDE;
27
28     // Task related methods
29     WebTaskList* taskList() { return &m_taskList; }
30
31 private:
32     WebTaskList m_taskList;
33     WebTestDelegate* m_delegate;
34
35     DISALLOW_COPY_AND_ASSIGN(WebUserMediaClientMock);
36 };
37
38 }
39
40 #endif  // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBUSERMEDIACLIENTMOCK_H_