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

Side by Side Diff: components/test_runner/app_banner_client.h

Issue 1807643002: Make test_runner::AppBannerClient an internal detail of components/test_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 9 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
« no previous file with comments | « no previous file | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/macros.h" 10 #include "base/macros.h"
11 #include "components/test_runner/test_runner_export.h" 11 #include "components/test_runner/test_runner_export.h"
12 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h" 12 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h"
13 13
14 namespace test_runner { 14 namespace test_runner {
15 15
16 // Test app banner client that holds on to callbacks and allows the test runner 16 // Test app banner client that holds on to callbacks and allows the test runner
17 // to resolve them. 17 // to resolve them.
18 class TEST_RUNNER_EXPORT AppBannerClient 18 class TEST_RUNNER_EXPORT AppBannerClient
19 : public NON_EXPORTED_BASE(blink::WebAppBannerClient) { 19 : public NON_EXPORTED_BASE(blink::WebAppBannerClient) {
20 public: 20 public:
21 AppBannerClient(); 21 AppBannerClient();
22 ~AppBannerClient() override; 22 ~AppBannerClient() override;
23 23
24 // blink::WebAppBannerClient: 24 // blink::WebAppBannerClient:
25 void registerBannerCallbacks( 25 void registerBannerCallbacks(
26 int requestId, 26 int requestId,
27 blink::WebAppBannerCallbacks* callbacks) override; 27 blink::WebAppBannerCallbacks* callbacks) override;
28 28
29 // Resolve the promise associated with the beforeinstallprompt event with the
30 // given |request_id|. The promise is resolved with a result.platform set to
31 // |platform|. If |platform| is not empty, result.outcome will be 'accepted',
32 // otherwise it will be 'dismissed'.
29 void ResolvePromise(int request_id, const std::string& platform); 33 void ResolvePromise(int request_id, const std::string& platform);
30 34
31 private: 35 private:
32 IDMap<blink::WebAppBannerCallbacks, IDMapOwnPointer> callbacks_map_; 36 IDMap<blink::WebAppBannerCallbacks, IDMapOwnPointer> callbacks_map_;
33 37
34 DISALLOW_COPY_AND_ASSIGN(AppBannerClient); 38 DISALLOW_COPY_AND_ASSIGN(AppBannerClient);
35 }; 39 };
36 40
37 } // namespace test_runner 41 } // namespace test_runner
38 42
39 #endif // COMPONENTS_TEST_RUNNER_APP_BANNER_CLIENT_H_ 43 #endif // COMPONENTS_TEST_RUNNER_APP_BANNER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698