OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
Sam McNally
2015/08/26 08:23:22
No (c)
calamity
2015/09/08 07:30:07
Done.
Sam McNally
2015/09/08 08:25:47
Not done yet.
| |
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_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "chrome/browser/ui/webui/engagement/site_engagement.mojom.h" | |
10 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h" | |
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | |
12 | |
13 class Profile; | |
14 | |
15 // Implementation of SiteEngagementUIHandlerMojo. StartOmniboxQuery() calls to a | |
16 // private AutocompleteController. It also listens for updates from the | |
17 // AutocompleteController to OnResultChanged() and passes those results to | |
18 // the OmniboxPage. | |
19 class SiteEngagementUIHandler : public SiteEngagementUIHandlerMojo, | |
20 public MojoWebUIHandler { | |
21 public: | |
22 // SiteEngagementUIHandler is deleted when the supplied pipe is destroyed. | |
23 SiteEngagementUIHandler( | |
24 Profile* profile, | |
25 mojo::InterfaceRequest<SiteEngagementUIHandlerMojo> request); | |
26 ~SiteEngagementUIHandler() override; | |
27 | |
28 // SiteEngagementUIHandlerMojo overrides: | |
29 void GetSiteEngagementInfo(SiteEngagementPagePtr page) override; | |
30 | |
31 private: | |
32 // The Profile* handed to us in our constructor. | |
33 Profile* profile_; | |
34 | |
35 mojo::StrongBinding<SiteEngagementUIHandlerMojo> binding_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(SiteEngagementUIHandler); | |
38 }; | |
39 | |
40 #endif // CHROME_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ | |
OLD | NEW |