Chromium Code Reviews| Index: chrome/browser/ui/webui/engagement/site_engagement_ui_handler.h |
| diff --git a/chrome/browser/ui/webui/engagement/site_engagement_ui_handler.h b/chrome/browser/ui/webui/engagement/site_engagement_ui_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8787b3bc2cf4a856f93712e79a432fd142be32d3 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/engagement/site_engagement_ui_handler.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ |
| +#define CHROME_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "chrome/browser/ui/webui/engagement/site_engagement.mojom.h" |
| +#include "chrome/browser/ui/webui/mojo_web_ui_handler.h" |
| +#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
| + |
| +class Profile; |
| + |
| +// Implementation of SiteEngagementUIHandlerMojo. StartOmniboxQuery() calls to a |
|
Sam McNally
2015/09/08 08:25:47
Update.
calamity
2015/09/10 06:57:33
Oops.
|
| +// private AutocompleteController. It also listens for updates from the |
| +// AutocompleteController to OnResultChanged() and passes those results to |
| +// the OmniboxPage. |
| +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
|
| + 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.
|
| + public: |
| + // SiteEngagementUIHandler is deleted when the supplied pipe is destroyed. |
| + SiteEngagementUIHandler( |
| + Profile* profile, |
| + mojo::InterfaceRequest<SiteEngagementUIHandlerMojo> request); |
| + ~SiteEngagementUIHandler() override; |
| + |
| + // SiteEngagementUIHandlerMojo overrides: |
| + void GetSiteEngagementInfo( |
| + const GetSiteEngagementInfoCallback& callback) override; |
| + |
| + private: |
| + // The Profile* handed to us in our constructor. |
| + Profile* profile_; |
| + |
| + mojo::StrongBinding<SiteEngagementUIHandlerMojo> binding_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SiteEngagementUIHandler); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBUI_ENGAGEMENT_SITE_ENGAGEMENT_UI_HANDLER_H_ |