| OLD | NEW |
| (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_BROWSER_UI_WEBUI_POPULAR_SITES_INTERNALS_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_POPULAR_SITES_INTERNALS_MESSAGE_HANDLER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/browser/web_ui_message_handler.h" |
| 11 |
| 12 namespace base { |
| 13 class ListValue; |
| 14 } // namespace base |
| 15 |
| 16 class PopularSites; |
| 17 |
| 18 // The implementation for the chrome://popular-sites-internals page. |
| 19 class PopularSitesInternalsMessageHandler |
| 20 : public content::WebUIMessageHandler { |
| 21 public: |
| 22 PopularSitesInternalsMessageHandler(); |
| 23 ~PopularSitesInternalsMessageHandler() override; |
| 24 |
| 25 private: |
| 26 // content::WebUIMessageHandler: |
| 27 void RegisterMessages() override; |
| 28 |
| 29 void HandleRegisterForEvents(const base::ListValue* args); |
| 30 void HandleDownload(const base::ListValue* args); |
| 31 |
| 32 void SendDownloadResult(bool success); |
| 33 void SendSites(); |
| 34 |
| 35 void OnPopularSitesAvailable(bool explicit_request, bool success); |
| 36 |
| 37 scoped_ptr<PopularSites> popular_sites_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(PopularSitesInternalsMessageHandler); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_WEBUI_POPULAR_SITES_INTERNALS_MESSAGE_HANDLER_H_ |
| OLD | NEW |