| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ | |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nClient.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 // A mock implementation of WebPresentationClient to be used in tests with | |
| 14 // content shell. | |
| 15 class MockPresentationClient : public blink::WebPresentationClient { | |
| 16 public: | |
| 17 explicit MockPresentationClient(); | |
| 18 virtual ~MockPresentationClient(); | |
| 19 | |
| 20 void SetScreenAvailability(bool available); | |
| 21 | |
| 22 private: | |
| 23 // From blink::WebPresentationClient. | |
| 24 // Passes the Blink-side delegate to the embedder. | |
| 25 virtual void setController(blink::WebPresentationController*); | |
| 26 | |
| 27 // Called when the frame attaches the first event listener to or removes the | |
| 28 // last event listener from the |availablechange| event. | |
| 29 virtual void updateAvailableChangeWatched(bool watched); | |
| 30 | |
| 31 blink::WebPresentationController* controller_; | |
| 32 bool screen_availability_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(MockPresentationClient); | |
| 35 }; | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ | |
| OLD | NEW |