OLD | NEW |
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_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
11 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" | 11 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" |
12 #include "chrome/browser/ui/webui/options2/options_ui2.h" | 12 #include "chrome/browser/ui/webui/options2/options_ui2.h" |
13 | 13 |
14 namespace options2 { | 14 namespace options2 { |
15 | 15 |
16 class HomePageOverlayHandler | 16 class HomePageOverlayHandler |
17 : public OptionsPageUIHandler, | 17 : public OptionsPageUIHandler, |
18 public AutocompleteControllerDelegate { | 18 public AutocompleteControllerDelegate { |
19 public: | 19 public: |
20 HomePageOverlayHandler(); | 20 HomePageOverlayHandler(); |
21 virtual ~HomePageOverlayHandler(); | 21 virtual ~HomePageOverlayHandler(); |
22 | 22 |
23 // OptionsPageUIHandler implementation | 23 // OptionsPageUIHandler implementation |
24 virtual void RegisterMessages() OVERRIDE; | 24 virtual void RegisterMessages() OVERRIDE; |
25 | 25 |
26 virtual void GetLocalizedValues(base::DictionaryValue*) OVERRIDE; | 26 virtual void GetLocalizedValues(base::DictionaryValue*) OVERRIDE; |
27 | 27 |
28 virtual void Initialize() OVERRIDE; | 28 virtual void InitializeHandler() OVERRIDE; |
29 | 29 |
30 // AutocompleteControllerDelegate implementation. | 30 // AutocompleteControllerDelegate implementation. |
31 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; | 31 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; |
32 | 32 |
33 private: | 33 private: |
34 void RequestAutocompleteSuggestions(const ListValue* args); | 34 void RequestAutocompleteSuggestions(const ListValue* args); |
35 | 35 |
36 scoped_ptr<AutocompleteController> autocomplete_controller_; | 36 scoped_ptr<AutocompleteController> autocomplete_controller_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(HomePageOverlayHandler); | 38 DISALLOW_COPY_AND_ASSIGN(HomePageOverlayHandler); |
39 }; | 39 }; |
40 | 40 |
41 } // namespace options2 | 41 } // namespace options2 |
42 | 42 |
43 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ | 43 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ |
OLD | NEW |