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

Side by Side Diff: chrome/browser/ui/webui/popular_sites_internals_message_handler.h

Issue 2457033003: Add chrome://popular-sites-internals/ to iOS. (Closed)
Patch Set: Break out ...Client. 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
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_BROWSER_UI_WEBUI_POPULAR_SITES_INTERNALS_MESSAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_POPULAR_SITES_INTERNALS_MESSAGE_HANDLER_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "content/public/browser/web_ui_message_handler.h"
14
15 namespace base {
16 class ListValue;
17 } // namespace base
18
19 namespace ntp_tiles {
20 class PopularSites;
21 } // namespace ntp_tiles
22
23 // The implementation for the chrome://popular-sites-internals page.
24 class PopularSitesInternalsMessageHandler
25 : public content::WebUIMessageHandler {
26 public:
27 PopularSitesInternalsMessageHandler();
28 ~PopularSitesInternalsMessageHandler() override;
29
30 private:
31 // content::WebUIMessageHandler:
32 void RegisterMessages() override;
33
34 void HandleRegisterForEvents(const base::ListValue* args);
35 void HandleUpdate(const base::ListValue* args);
36 void HandleViewJson(const base::ListValue* args);
37
38 void SendOverrides();
39 void SendDownloadResult(bool success);
40 void SendSites();
41 void SendJson(const std::string& json);
42
43 void OnPopularSitesAvailable(bool explicit_request, bool success);
44
45 std::unique_ptr<ntp_tiles::PopularSites> popular_sites_;
46
47 base::WeakPtrFactory<PopularSitesInternalsMessageHandler> weak_ptr_factory_;
48
49 DISALLOW_COPY_AND_ASSIGN(PopularSitesInternalsMessageHandler);
50 };
51
52 #endif // CHROME_BROWSER_UI_WEBUI_POPULAR_SITES_INTERNALS_MESSAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/webui/popular_sites_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698