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

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

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to comments, merge Created 6 years, 9 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
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_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/public/common/page_transition_types.h" 9 #include "content/public/common/page_transition_types.h"
10 #include "ui/base/window_open_disposition.h" 10 #include "ui/base/window_open_disposition.h"
(...skipping 26 matching lines...) Expand all
37 virtual void Update(const content::WebContents* contents) = 0; 37 virtual void Update(const content::WebContents* contents) = 0;
38 38
39 // Called when anything has changed that might affect the layout or contents 39 // Called when anything has changed that might affect the layout or contents
40 // of the views around the edit, including the text of the edit and the 40 // of the views around the edit, including the text of the edit and the
41 // status of any keyword- or hint-related state. 41 // status of any keyword- or hint-related state.
42 virtual void OnChanged() = 0; 42 virtual void OnChanged() = 0;
43 43
44 // Called whenever the autocomplete edit gets focused. 44 // Called whenever the autocomplete edit gets focused.
45 virtual void OnSetFocus() = 0; 45 virtual void OnSetFocus() = 0;
46 46
47 // Hides the origin chip and shows the URL.
48 virtual void ShowURL() = 0;
49
50 // Hides the origin chip while leaving the Omnibox empty.
51 void HideOriginChip();
52
53 // Shows the origin chip. Hides the URL if it was previously shown by a call
54 // to ShowURL().
55 void ShowOriginChip();
56
47 // Returns the InstantController, or NULL if instant is not enabled. 57 // Returns the InstantController, or NULL if instant is not enabled.
48 virtual InstantController* GetInstant() = 0; 58 virtual InstantController* GetInstant() = 0;
49 59
50 // Returns the WebContents of the currently active tab. 60 // Returns the WebContents of the currently active tab.
51 virtual content::WebContents* GetWebContents() = 0; 61 virtual content::WebContents* GetWebContents() = 0;
52 62
53 virtual ToolbarModel* GetToolbarModel() = 0; 63 virtual ToolbarModel* GetToolbarModel() = 0;
54 virtual const ToolbarModel* GetToolbarModel() const = 0; 64 virtual const ToolbarModel* GetToolbarModel() const = 0;
55 65
56 protected: 66 protected:
57 explicit OmniboxEditController(CommandUpdater* command_updater); 67 explicit OmniboxEditController(CommandUpdater* command_updater);
58 virtual ~OmniboxEditController(); 68 virtual ~OmniboxEditController();
59 69
70 // Hides the URL and shows the origin chip.
71 virtual void HideURL() = 0;
72
60 CommandUpdater* command_updater() { return command_updater_; } 73 CommandUpdater* command_updater() { return command_updater_; }
61 GURL destination_url() const { return destination_url_; } 74 GURL destination_url() const { return destination_url_; }
62 WindowOpenDisposition disposition() const { return disposition_; } 75 WindowOpenDisposition disposition() const { return disposition_; }
63 content::PageTransition transition() const { return transition_; } 76 content::PageTransition transition() const { return transition_; }
64 77
65 private: 78 private:
66 CommandUpdater* command_updater_; 79 CommandUpdater* command_updater_;
67 80
68 // The details necessary to open the user's desired omnibox match. 81 // The details necessary to open the user's desired omnibox match.
69 GURL destination_url_; 82 GURL destination_url_;
70 WindowOpenDisposition disposition_; 83 WindowOpenDisposition disposition_;
71 content::PageTransition transition_; 84 content::PageTransition transition_;
72 85
73 DISALLOW_COPY_AND_ASSIGN(OmniboxEditController); 86 DISALLOW_COPY_AND_ASSIGN(OmniboxEditController);
74 }; 87 };
75 88
76 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ 89 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698