Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: content/shell/renderer/test_runner/mock_presentation_client.h

Issue 905823004: Added MockPresentationClient to use in layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698