Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / omnibox / browser / omnibox_edit_controller.h
blob26b453fd7a3edabff4166785f618bf3c8dbf146b
1 // Copyright 2015 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.
5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_CONTROLLER_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_CONTROLLER_H_
8 #include "base/strings/string16.h"
9 #include "ui/base/page_transition_types.h"
10 #include "ui/base/window_open_disposition.h"
11 #include "url/gurl.h"
13 class ToolbarModel;
15 namespace gfx {
16 class Image;
19 class OmniboxEditController {
20 public:
21 virtual void OnAutocompleteAccept(const GURL& destination_url,
22 WindowOpenDisposition disposition,
23 ui::PageTransition transition);
25 // Called when the the controller should update itself without restoring any
26 // tab state.
27 virtual void UpdateWithoutTabRestore() = 0;
29 // Called when anything has changed that might affect the layout or contents
30 // of the views around the edit, including the text of the edit and the
31 // status of any keyword- or hint-related state.
32 virtual void OnChanged() = 0;
34 // Called whenever the autocomplete edit gets focused.
35 virtual void OnSetFocus() = 0;
37 // Shows the URL.
38 virtual void ShowURL() = 0;
40 virtual ToolbarModel* GetToolbarModel() = 0;
41 virtual const ToolbarModel* GetToolbarModel() const = 0;
43 protected:
44 OmniboxEditController();
45 virtual ~OmniboxEditController();
47 GURL destination_url() const { return destination_url_; }
48 WindowOpenDisposition disposition() const { return disposition_; }
49 ui::PageTransition transition() const { return transition_; }
51 private:
52 // The details necessary to open the user's desired omnibox match.
53 GURL destination_url_;
54 WindowOpenDisposition disposition_;
55 ui::PageTransition transition_;
57 DISALLOW_COPY_AND_ASSIGN(OmniboxEditController);
60 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_CONTROLLER_H_