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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
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 "ui/base/page_transition_types.h"
10 #include "ui/base/window_open_disposition.h" 10 #include "ui/base/window_open_disposition.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 class CommandUpdater; 13 class CommandUpdater;
14 class InstantController; 14 class InstantController;
15 class ToolbarModel; 15 class ToolbarModel;
16 16
17 namespace content { 17 namespace content {
18 class WebContents; 18 class WebContents;
19 } 19 }
20 20
21 namespace gfx { 21 namespace gfx {
22 class Image; 22 class Image;
23 } 23 }
24 24
25 // I am in hack-and-slash mode right now. 25 // I am in hack-and-slash mode right now.
26 // http://code.google.com/p/chromium/issues/detail?id=6772 26 // http://code.google.com/p/chromium/issues/detail?id=6772
27 27
28 // Embedders of an AutocompleteEdit widget must implement this class. 28 // Embedders of an AutocompleteEdit widget must implement this class.
29 class OmniboxEditController { 29 class OmniboxEditController {
30 public: 30 public:
31 void OnAutocompleteAccept(const GURL& destination_url, 31 void OnAutocompleteAccept(const GURL& destination_url,
32 WindowOpenDisposition disposition, 32 WindowOpenDisposition disposition,
33 content::PageTransition transition); 33 ui::PageTransition transition);
34 34
35 // Updates the controller, and, if |contents| is non-NULL, restores saved 35 // Updates the controller, and, if |contents| is non-NULL, restores saved
36 // state that the tab holds. 36 // state that the tab holds.
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
(...skipping 27 matching lines...) Expand all
71 protected: 71 protected:
72 explicit OmniboxEditController(CommandUpdater* command_updater); 72 explicit OmniboxEditController(CommandUpdater* command_updater);
73 virtual ~OmniboxEditController(); 73 virtual ~OmniboxEditController();
74 74
75 // Hides the URL and shows the origin chip. 75 // Hides the URL and shows the origin chip.
76 virtual void HideURL() = 0; 76 virtual void HideURL() = 0;
77 77
78 CommandUpdater* command_updater() { return command_updater_; } 78 CommandUpdater* command_updater() { return command_updater_; }
79 GURL destination_url() const { return destination_url_; } 79 GURL destination_url() const { return destination_url_; }
80 WindowOpenDisposition disposition() const { return disposition_; } 80 WindowOpenDisposition disposition() const { return disposition_; }
81 content::PageTransition transition() const { return transition_; } 81 ui::PageTransition transition() const { return transition_; }
82 82
83 private: 83 private:
84 CommandUpdater* command_updater_; 84 CommandUpdater* command_updater_;
85 85
86 // The details necessary to open the user's desired omnibox match. 86 // The details necessary to open the user's desired omnibox match.
87 GURL destination_url_; 87 GURL destination_url_;
88 WindowOpenDisposition disposition_; 88 WindowOpenDisposition disposition_;
89 content::PageTransition transition_; 89 ui::PageTransition transition_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(OmniboxEditController); 91 DISALLOW_COPY_AND_ASSIGN(OmniboxEditController);
92 }; 92 };
93 93
94 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ 94 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698