| Index: chrome/browser/ui/omnibox/omnibox_controller.h
|
| diff --git a/chrome/browser/ui/omnibox/omnibox_controller.h b/chrome/browser/ui/omnibox/omnibox_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..13f223fb75ba8302126b9b77863c353d61a3822c
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/omnibox/omnibox_controller.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
|
| +#define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
|
| +
|
| +class AutocompleteController;
|
| +class OmniboxEditModel;
|
| +class Profile;
|
| +
|
| +// This class sits between the OmniboxEditModel and AutocompleteController.
|
| +// TODO(beaudoin): Keep on expanding this class so that OmniboxEditModel no
|
| +// longer need to hold any reference to AutocompleteController. Also make
|
| +// this the point of contact between InstantController and OmniboxEditModel.
|
| +class OmniboxController : public AutocompleteControllerDelegate {
|
| +
|
| + public:
|
| + OmniboxController(OmniboxEditModel* omnibox_edit_model,
|
| + Profile* profile);
|
| + virtual ~OmniboxController();
|
| +
|
| + AutocompleteController* autocomplete_controller() const {
|
| + return autocomplete_controller_.get();
|
| + }
|
| +
|
| + // AutocompleteControllerDelegate:
|
| + virtual void OnResultChanged(bool default_match_changed) OVERRIDE;
|
| +
|
| + private:
|
| + // Weak, it owns us.
|
| + // TODO(beaudoin): When we have a clearer picture of the interface between
|
| + // this and OmniboxEditModel define and use a Delegate interface instead.
|
| + OmniboxEditModel* omnibox_edit_model_;
|
| +
|
| + scoped_ptr<AutocompleteController> autocomplete_controller_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(OmniboxController);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
|
|
|