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

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

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Rebase Created 4 years, 2 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 2016 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 COMPONENTS_TEST_RUNNER_APP_BANNER_SERVICE_H_
6 #define COMPONENTS_TEST_RUNNER_APP_BANNER_SERVICE_H_
7
8 #include "base/macros.h"
9 #include "components/test_runner/test_runner_export.h"
10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "mojo/public/cpp/system/message_pipe.h"
12 #include "third_party/WebKit/public/platform/modules/app_banner/app_banner.mojom .h"
13
14 namespace test_runner {
15
16 // Test app banner service that is registered as a Mojo service for
17 // BeforeInstallPromptEvents to look up when the test runner is executed.
18 class TEST_RUNNER_EXPORT AppBannerService
19 : public NON_EXPORTED_BASE(blink::mojom::AppBannerService) {
20 public:
21 AppBannerService();
22 ~AppBannerService() override;
23
24 mojo::ScopedMessagePipeHandle GetEventHandle();
25 mojo::ScopedMessagePipeHandle GetServiceHandle();
26 void ResolvePromise(const std::string& platform);
27
28 // blink::mojom::AppBannerService overrides.
29 void DisplayAppBanner() override;
30
31 private:
32 mojo::Binding<blink::mojom::AppBannerService> binding_;
33 blink::mojom::AppBannerEventPtr event_;
34
35 DISALLOW_COPY_AND_ASSIGN(AppBannerService);
36 };
37
38 } // namespace test_runner
39
40 #endif // COMPONENTS_TEST_RUNNER_APP_BANNER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698