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_APP_BANNER_CLIENT_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_APP_BANNER_CLIENT_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_APP_BANNER_CLIENT_H_ | 6 #define COMPONENTS_TEST_RUNNER_APP_BANNER_CLIENT_H_ |
7 | 7 |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 9 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 // Test app banner client that holds on to callbacks and allows the test runner | 13 // Test app banner client that holds on to callbacks and allows the test runner |
14 // to resolve them. | 14 // to resolve them. |
15 class AppBannerClient : public blink::WebAppBannerClient { | 15 class AppBannerClient : public blink::WebAppBannerClient { |
16 public: | 16 public: |
17 AppBannerClient(); | 17 AppBannerClient(); |
18 virtual ~AppBannerClient(); | 18 virtual ~AppBannerClient(); |
19 | 19 |
20 // blink::WebAppBannerClient: | 20 // blink::WebAppBannerClient: |
21 void registerBannerCallbacks( | 21 void registerBannerCallbacks( |
22 int requestId, | 22 int requestId, |
23 blink::WebAppBannerCallbacks* callbacks) override; | 23 blink::WebAppBannerCallbacks* callbacks) override; |
24 | 24 |
25 void ResolvePromise(int request_id, const std::string& platform); | 25 void ResolvePromise(int request_id, const std::string& platform); |
26 | 26 |
27 private: | 27 private: |
28 IDMap<blink::WebAppBannerCallbacks, IDMapOwnPointer> callbacks_map_; | 28 IDMap<blink::WebAppBannerCallbacks, IDMapOwnPointer> callbacks_map_; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(AppBannerClient); | 30 DISALLOW_COPY_AND_ASSIGN(AppBannerClient); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace content | 33 } // namespace content |
34 | 34 |
35 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_APP_BANNER_CLIENT_H_ | 35 #endif // COMPONENTS_TEST_RUNNER_APP_BANNER_CLIENT_H_ |
OLD | NEW |