Convert browser_tests to Swarming.
[chromium-blink-merge.git] / chrome / browser / media / router / mock_media_router.h
blob8633d2a89a1ad0394a198e4299e8920126c79d78
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.
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_
8 #include <string>
9 #include <vector>
11 #include "chrome/browser/media/router/issue.h"
12 #include "chrome/browser/media/router/media_route.h"
13 #include "chrome/browser/media/router/media_router.h"
14 #include "chrome/browser/media/router/media_sink.h"
15 #include "chrome/browser/media/router/media_source.h"
16 #include "testing/gmock/include/gmock/gmock.h"
18 namespace media_router {
20 // Media Router mock class. Used for testing purposes.
21 class MockMediaRouter : public MediaRouter {
22 public:
23 MockMediaRouter();
24 virtual ~MockMediaRouter();
26 MOCK_METHOD5(CreateRoute,
27 void(const MediaSource::Id& source,
28 const MediaSink::Id& sink_id,
29 const GURL& origin,
30 int tab_id,
31 const MediaRouteResponseCallback& callback));
32 MOCK_METHOD5(JoinRoute,
33 void(const MediaSource::Id& source,
34 const std::string& presentation_id,
35 const GURL& origin,
36 int tab_id,
37 const MediaRouteResponseCallback& callback));
38 MOCK_METHOD1(CloseRoute, void(const MediaRoute::Id& route_id));
39 MOCK_METHOD3(SendRouteMessage,
40 void(const MediaRoute::Id& route_id,
41 const std::string& message,
42 const SendRouteMessageCallback& callback));
43 MOCK_METHOD2(ListenForRouteMessages,
44 void(const std::vector<MediaRoute::Id>& route_ids,
45 const PresentationSessionMessageCallback& message_cb));
46 MOCK_METHOD1(ClearIssue, void(const Issue::Id& issue_id));
47 MOCK_METHOD1(RegisterIssuesObserver, void(IssuesObserver* observer));
48 MOCK_METHOD1(UnregisterIssuesObserver, void(IssuesObserver* observer));
50 MOCK_METHOD1(RegisterMediaSinksObserver, void(MediaSinksObserver* observer));
51 MOCK_METHOD1(UnregisterMediaSinksObserver,
52 void(MediaSinksObserver* observer));
53 MOCK_METHOD1(RegisterMediaRoutesObserver,
54 void(MediaRoutesObserver* observer));
55 MOCK_METHOD1(UnregisterMediaRoutesObserver,
56 void(MediaRoutesObserver* observer));
59 } // namespace media_router
61 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_