Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 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_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 | |
|
Sam McNally
2015/09/08 08:25:47
Update.
calamity
2015/09/10 06:57:33
Oops.
| |
| 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, | |
|
Sam McNally
2015/09/08 08:25:47
If you don't need this to be public, consider putt
calamity
2015/09/10 06:57:33
Hmm. I can't think of any reason it would need to
| |
| 20 public MojoWebUIHandler { | |
|
Sam McNally
2015/09/08 08:25:47
I don't think this is necessary anymore.
calamity
2015/09/10 06:57:33
Done.
| |
| 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( | |
| 30 const GetSiteEngagementInfoCallback& callback) override; | |
| 31 | |
| 32 private: | |
| 33 // The Profile* handed to us in our constructor. | |
| 34 Profile* profile_; | |
| 35 | |
| 36 mojo::StrongBinding<SiteEngagementUIHandlerMojo> binding_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(SiteEngagementUIHandler); | |
| 39 }; | |
| 40 | |
| 41 #endif // CHROME_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ | |
| OLD | NEW |