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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_controller.h

Issue 13932034: Omnibox refactor, introduced OmniboxController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered Peter's comments. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
11
12 class AutocompleteController;
13 class OmniboxEditModel;
14 class Profile;
15
16 // This class controls the various services that can modify the content
17 // of the omnibox, including AutocompleteController and InstantController. It is
18 // responsible of updating the omnibox content.
Peter Kasting 2013/04/25 20:52:09 Nit: of -> for
beaudoin 2013/04/25 21:09:46 Done.
19 // TODO(beaudoin): Keep on expanding this class so that OmniboxEditModel no
20 // longer needs to hold any reference to AutocompleteController. Also make
21 // this the point of contact between InstantController and OmniboxEditModel.
22 // As the refactor progresses, keep the class comment up-to-date to
23 // precisely explain what this class is doing.
24 class OmniboxController : public AutocompleteControllerDelegate {
25
26 public:
27 OmniboxController(OmniboxEditModel* omnibox_edit_model, Profile* profile);
28 virtual ~OmniboxController();
29
30 // AutocompleteControllerDelegate:
31 virtual void OnResultChanged(bool default_match_changed) OVERRIDE;
32
33 // TODO(beaudoin): This should be a const method returning a const pointer but
34 // it breaks things in a couple of places. Try to fix this.
35 AutocompleteController* autocomplete_controller() {
36 return autocomplete_controller_.get();
37 }
38
39 private:
40 // Weak, it owns us.
41 OmniboxEditModel* omnibox_edit_model_;
42
43 scoped_ptr<AutocompleteController> autocomplete_controller_;
44
45 DISALLOW_COPY_AND_ASSIGN(OmniboxController);
46 };
47
48 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698