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

Side by Side Diff: chrome/renderer/banners/app_banner_client.h

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Add TODO Created 4 years, 1 month 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 | « chrome/renderer/banners/OWNERS ('k') | chrome/renderer/banners/app_banner_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_RENDERER_BANNERS_APP_BANNER_CLIENT_H_
6 #define CHROME_RENDERER_BANNERS_APP_BANNER_CLIENT_H_
7
8 #include <stdint.h>
9 #include <string>
10
11 #include "base/id_map.h"
12 #include "base/macros.h"
13 #include "content/public/renderer/render_frame_observer.h"
14 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie nt.h"
15 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerProm ptResult.h"
16
17 namespace IPC {
18 class Message;
19 } // namespace IPC
20
21 class AppBannerClient : public content::RenderFrameObserver,
22 public blink::WebAppBannerClient {
23 public:
24 explicit AppBannerClient(content::RenderFrame* render_frame);
25 ~AppBannerClient() override;
26
27 private:
28 // content::RenderFrameObserver implementation.
29 void OnDestruct() override;
30 bool OnMessageReceived(const IPC::Message& message) override;
31
32 // WebAppBannerClient implementation.
33 void registerBannerCallbacks(int request_id,
34 blink::WebAppBannerCallbacks*) override;
35
36 void showAppBanner(int request_id) override;
37
38 void ResolveEvent(int request_id,
39 const std::string& platform,
40 const blink::WebAppBannerPromptResult::Outcome& outcome);
41 void OnBannerAccepted(int request_id, const std::string& platform);
42 void OnBannerDismissed(int request_id);
43
44 IDMap<blink::WebAppBannerCallbacks, IDMapOwnPointer>
45 banner_callbacks_;
46
47 DISALLOW_COPY_AND_ASSIGN(AppBannerClient);
48 };
49
50 #endif // CHROME_RENDERER_BANNERS_APP_BANNER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/renderer/banners/OWNERS ('k') | chrome/renderer/banners/app_banner_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698