| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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 #ifndef WebUserMediaClientMock_h | 31 #ifndef WebUserMediaClientMock_h |
| 32 #define WebUserMediaClientMock_h | 32 #define WebUserMediaClientMock_h |
| 33 | 33 |
| 34 #include "TestCommon.h" | 34 #include "TestCommon.h" |
| 35 #include "public/platform/WebCommon.h" | 35 #include "public/platform/WebCommon.h" |
| 36 #include "public/platform/WebNonCopyable.h" |
| 36 #include "public/platform/WebString.h" | 37 #include "public/platform/WebString.h" |
| 37 #include "public/platform/WebURL.h" | 38 #include "public/platform/WebURL.h" |
| 38 #include "public/testing/WebTask.h" | 39 #include "public/testing/WebTask.h" |
| 39 #include "public/web/WebUserMediaClient.h" | 40 #include "public/web/WebUserMediaClient.h" |
| 40 | 41 |
| 41 namespace WebTestRunner { | 42 namespace WebTestRunner { |
| 42 | 43 |
| 43 class WebTestDelegate; | 44 class WebTestDelegate; |
| 44 | 45 |
| 45 class WebUserMediaClientMock : public WebKit::WebUserMediaClient { | 46 class WebUserMediaClientMock : public WebKit::WebUserMediaClient, public WebKit:
:WebNonCopyable { |
| 46 public: | 47 public: |
| 47 explicit WebUserMediaClientMock(WebTestDelegate*); | 48 explicit WebUserMediaClientMock(WebTestDelegate*); |
| 48 ~WebUserMediaClientMock() { } | 49 ~WebUserMediaClientMock() { } |
| 49 | 50 |
| 50 virtual void requestUserMedia(const WebKit::WebUserMediaRequest&) OVERRIDE; | 51 virtual void requestUserMedia(const WebKit::WebUserMediaRequest&) OVERRIDE; |
| 51 virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&) OVER
RIDE; | 52 virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&) OVER
RIDE; |
| 52 | 53 |
| 53 // Task related methods | 54 // Task related methods |
| 54 WebTaskList* taskList() { return &m_taskList; } | 55 WebTaskList* taskList() { return &m_taskList; } |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 WebTaskList m_taskList; | 58 WebTaskList m_taskList; |
| 58 WebTestDelegate* m_delegate; | 59 WebTestDelegate* m_delegate; |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } | 62 } |
| 62 | 63 |
| 63 #endif // WebUserMediaClientMock_h | 64 #endif // WebUserMediaClientMock_h |
| OLD | NEW |