| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ |
| 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "components/omnibox/browser/autocomplete_controller.h" | 13 #include "components/omnibox/browser/autocomplete_controller.h" |
| 14 #include "components/omnibox/browser/autocomplete_controller_delegate.h" | 14 #include "components/omnibox/browser/autocomplete_controller_delegate.h" |
| 15 #include "components/omnibox/browser/autocomplete_match.h" | 15 #include "components/omnibox/browser/autocomplete_match.h" |
| 16 | 16 |
| 17 class AUtocompleteInput; | |
| 18 struct AutocompleteMatch; | 17 struct AutocompleteMatch; |
| 19 class AutocompleteResult; | 18 class AutocompleteResult; |
| 20 class InstantController; | 19 class InstantController; |
| 21 class OmniboxClient; | 20 class OmniboxClient; |
| 22 class OmniboxEditModel; | 21 class OmniboxEditModel; |
| 23 class OmniboxPopupModel; | 22 class OmniboxPopupModel; |
| 24 | 23 |
| 25 namespace gfx { | |
| 26 class Rect; | |
| 27 } | |
| 28 | |
| 29 // This class controls the various services that can modify the content | 24 // This class controls the various services that can modify the content |
| 30 // for the omnibox, including AutocompleteController and InstantController. It | 25 // for the omnibox, including AutocompleteController and InstantController. It |
| 31 // is responsible of updating the omnibox content. | 26 // is responsible of updating the omnibox content. |
| 32 // TODO(beaudoin): Keep on expanding this class so that OmniboxEditModel no | 27 // TODO(beaudoin): Keep on expanding this class so that OmniboxEditModel no |
| 33 // longer needs to hold any reference to AutocompleteController. Also make | 28 // longer needs to hold any reference to AutocompleteController. Also make |
| 34 // this the point of contact between InstantController and OmniboxEditModel. | 29 // this the point of contact between InstantController and OmniboxEditModel. |
| 35 // As the refactor progresses, keep the class comment up to date to | 30 // As the refactor progresses, keep the class comment up to date to |
| 36 // precisely explain what this class is doing. | 31 // precisely explain what this class is doing. |
| 37 class OmniboxController : public AutocompleteControllerDelegate { | 32 class OmniboxController : public AutocompleteControllerDelegate { |
| 38 public: | 33 public: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // but the ones specifically needed are unclear. We should therefore spend | 85 // but the ones specifically needed are unclear. We should therefore spend |
| 91 // some time to extract these fields and use a tighter structure here. | 86 // some time to extract these fields and use a tighter structure here. |
| 92 AutocompleteMatch current_match_; | 87 AutocompleteMatch current_match_; |
| 93 | 88 |
| 94 base::WeakPtrFactory<OmniboxController> weak_ptr_factory_; | 89 base::WeakPtrFactory<OmniboxController> weak_ptr_factory_; |
| 95 | 90 |
| 96 DISALLOW_COPY_AND_ASSIGN(OmniboxController); | 91 DISALLOW_COPY_AND_ASSIGN(OmniboxController); |
| 97 }; | 92 }; |
| 98 | 93 |
| 99 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ | 94 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ |
| OLD | NEW |