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