Chromium Code Reviews| Index: content/shell/renderer/test_runner/mock_presentation_client.h |
| diff --git a/content/shell/renderer/test_runner/mock_presentation_client.h b/content/shell/renderer/test_runner/mock_presentation_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..074449154086be3928d9333a4aae5fb4f9b4bf35 |
| --- /dev/null |
| +++ b/content/shell/renderer/test_runner/mock_presentation_client.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ |
| +#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ |
| + |
| +#include "base/macros.h" |
| +#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h" |
| + |
| +namespace content { |
| + |
| +// A mock implementation of WebPresentationClient to be used in tests with |
| +// content shell. |
| +class MockPresentationClient : public blink::WebPresentationClient { |
| + public: |
| + explicit MockPresentationClient(); |
|
Peter Beverloo
2015/02/09 17:40:32
s/explicit//
whywhat
2015/02/12 16:30:48
Done.
|
| + virtual ~MockPresentationClient(); |
| + |
| + void SetScreenAvailability(bool available); |
| + |
| + private: |
| + // From blink::WebPresentationClient. |
|
Peter Beverloo
2015/02/09 17:40:32
nit: We usually don't document the implementation
whywhat
2015/02/12 16:30:47
Done.
|
| + // Passes the Blink-side delegate to the embedder. |
| + virtual void setController(blink::WebPresentationController*); |
|
Peter Beverloo
2015/02/09 17:40:32
Please name the argument.
whywhat
2015/02/12 16:30:47
Done.
|
| + |
| + // Called when the frame attaches the first event listener to or removes the |
| + // last event listener from the |availablechange| event. |
| + virtual void updateAvailableChangeWatched(bool watched); |
| + |
| + blink::WebPresentationController* controller_; |
| + bool screen_availability_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MockPresentationClient); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_PRESENTATION_CLIENT_H_ |