| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MOCK_PRESENTATION_CLIENT_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nClient.h" | 9 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nClient.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Used to imitate the screen availability change by the tests. | 24 // Used to imitate the screen availability change by the tests. |
| 25 void SetScreenAvailability(bool available); | 25 void SetScreenAvailability(bool available); |
| 26 | 26 |
| 27 // Resets the client test state to the defaults for the next test. | 27 // Resets the client test state to the defaults for the next test. |
| 28 void Reset(); | 28 void Reset(); |
| 29 | 29 |
| 30 // blink::WebPresentationClient implementation. | 30 // blink::WebPresentationClient implementation. |
| 31 virtual void setController(blink::WebPresentationController* controller); | 31 virtual void setController(blink::WebPresentationController* controller); |
| 32 virtual void updateAvailableChangeWatched(bool watched); | 32 virtual void updateAvailableChangeWatched(bool watched); |
| 33 virtual void startSession( |
| 34 const blink::WebString& presentationUrl, |
| 35 const blink::WebString& presentationId, |
| 36 blink::WebPresentationSessionCreateCallback* callback); |
| 37 virtual void joinSession( |
| 38 const blink::WebString& presentationUrl, |
| 39 const blink::WebString& presentationId, |
| 40 blink::WebPresentationSessionCreateCallback* callback); |
| 33 | 41 |
| 34 private: | 42 private: |
| 35 // The actual WebPresentationController implementation that's being tested. | 43 // The actual WebPresentationController implementation that's being tested. |
| 36 // Associated with the same frame as this client. | 44 // Associated with the same frame as this client. |
| 37 blink::WebPresentationController* controller_; | 45 blink::WebPresentationController* controller_; |
| 38 | 46 |
| 39 // The last known state of the screen availability. Defaults to false. | 47 // The last known state of the screen availability. Defaults to false. |
| 40 bool screen_availability_; | 48 bool screen_availability_; |
| 41 | 49 |
| 42 // The common mock service for all mock clients within the same RenderView. | 50 // The common mock service for all mock clients within the same RenderView. |
| 43 // Used to register/unregister itself from. | 51 // Used to register/unregister itself from. |
| 44 MockPresentationService* service_; | 52 MockPresentationService* service_; |
| 45 | 53 |
| 46 DISALLOW_COPY_AND_ASSIGN(MockPresentationClient); | 54 DISALLOW_COPY_AND_ASSIGN(MockPresentationClient); |
| 47 }; | 55 }; |
| 48 | 56 |
| 49 } // namespace content | 57 } // namespace content |
| 50 | 58 |
| 51 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ | 59 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ |
| OLD | NEW |