1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_HANDLER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h"
10 #include "content/public/browser/web_ui_message_handler.h"
18 // UI Handler for chrome://suggestions-internals/
19 class SuggestionsInternalsUIHandler
: public content::WebUIMessageHandler
,
20 public SuggestionsCombiner::Delegate
{
22 explicit SuggestionsInternalsUIHandler(Profile
* profile
);
23 ~SuggestionsInternalsUIHandler() override
;
25 // SuggestionsCombiner::Delegate implementation.
26 void OnSuggestionsReady() override
;
29 // WebUIMessageHandler implementation.
30 // Register our handler to get callbacks from javascript.
31 void RegisterMessages() override
;
33 void HandleGetSuggestions(const base::ListValue
* one_element_input_string
);
35 // Used to combine suggestions from various sources.
36 scoped_ptr
<SuggestionsCombiner
> suggestions_combiner_
;
40 DISALLOW_COPY_AND_ASSIGN(SuggestionsInternalsUIHandler
);
43 #endif // CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_HANDLER_H_