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

Side by Side Diff: chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui_handler.h

Issue 10666009: Added already_open column to chrome://suggestions-internals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed unit tests Created 8 years, 5 months 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
« no previous file with comments | « chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_H ANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_H ANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_H ANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_UI_H ANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h" 11 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h"
12 #include "content/public/browser/web_ui_message_handler.h" 12 #include "content/public/browser/web_ui_message_handler.h"
13 13
14 class Profile; 14 class Profile;
15 15
16 namespace base {
17 class ListValue;
18 }
19
16 // UI Handler for chrome://suggestions-internals/ 20 // UI Handler for chrome://suggestions-internals/
17 class SuggestionsInternalsUIHandler : public content::WebUIMessageHandler, 21 class SuggestionsInternalsUIHandler : public content::WebUIMessageHandler,
18 public SuggestionsCombiner::Delegate { 22 public SuggestionsCombiner::Delegate {
19 public: 23 public:
20 explicit SuggestionsInternalsUIHandler(Profile* profile); 24 explicit SuggestionsInternalsUIHandler(Profile* profile);
21 virtual ~SuggestionsInternalsUIHandler(); 25 virtual ~SuggestionsInternalsUIHandler();
22 26
23 // SuggestionsCombiner::Delegate implementation. 27 // SuggestionsCombiner::Delegate implementation.
24 virtual void OnSuggestionsReady() OVERRIDE; 28 virtual void OnSuggestionsReady() OVERRIDE;
25 29
26 protected: 30 protected:
27 // WebUIMessageHandler implementation. 31 // WebUIMessageHandler implementation.
28 // Register our handler to get callbacks from javascript. 32 // Register our handler to get callbacks from javascript.
29 virtual void RegisterMessages() OVERRIDE; 33 virtual void RegisterMessages() OVERRIDE;
30 34
31 void HandleGetSuggestions(const base::ListValue* one_element_input_string); 35 void HandleGetSuggestions(const base::ListValue* one_element_input_string);
32 36
33 // Used to combine suggestions from various sources. 37 // Used to combine suggestions from various sources.
34 scoped_ptr<SuggestionsCombiner> suggestions_combiner_; 38 scoped_ptr<SuggestionsCombiner> suggestions_combiner_;
35 39
36 Profile* profile_; 40 Profile* profile_;
37 41
38 DISALLOW_COPY_AND_ASSIGN(SuggestionsInternalsUIHandler); 42 DISALLOW_COPY_AND_ASSIGN(SuggestionsInternalsUIHandler);
39 }; 43 };
40 44
41 #endif // CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_U I_HANDLER_H_ 45 #endif // CHROME_BROWSER_UI_WEBUI_SUGGESTIONS_INTERNALS_SUGGESTIONS_INTERNALS_U I_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698