| 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 GetLocalizedValues(base::DictionaryValue*) OVERRIDE; | 24 virtual void GetLocalizedValues(base::DictionaryValue*) OVERRIDE; |
| 25 virtual void InitializeHandler() OVERRIDE; | 25 virtual void InitializePage() OVERRIDE; |
| 26 virtual void RegisterMessages() OVERRIDE; | 26 virtual void RegisterMessages() OVERRIDE; |
| 27 | 27 |
| 28 // AutocompleteControllerDelegate implementation. | 28 // AutocompleteControllerDelegate implementation. |
| 29 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; | 29 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 void RequestAutocompleteSuggestions(const ListValue* args); | 32 void RequestAutocompleteSuggestions(const ListValue* args); |
| 33 | 33 |
| 34 scoped_ptr<AutocompleteController> autocomplete_controller_; | 34 scoped_ptr<AutocompleteController> autocomplete_controller_; |
| 35 | 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(HomePageOverlayHandler); | 36 DISALLOW_COPY_AND_ASSIGN(HomePageOverlayHandler); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace options2 | 39 } // namespace options2 |
| 40 | 40 |
| 41 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ | 41 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_HOME_PAGE_OVERLAY_HANDLER2_H_ |
| OLD | NEW |