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

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

Issue 2381373003: Fixed the issue shows keyword hint when omnibox loses its focus. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/omnibox/chrome_omnibox_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_CHROME_OMNIBOX_EDIT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/omnibox/browser/omnibox_edit_controller.h" 9 #include "components/omnibox/browser/omnibox_edit_controller.h"
10 #include "components/omnibox/common/omnibox_focus_state.h"
10 11
11 class CommandUpdater; 12 class CommandUpdater;
12 13
13 namespace content { 14 namespace content {
14 class WebContents; 15 class WebContents;
15 } 16 }
16 17
17 // Chrome-specific extension of the OmniboxEditController base class. 18 // Chrome-specific extension of the OmniboxEditController base class.
18 class ChromeOmniboxEditController : public OmniboxEditController { 19 class ChromeOmniboxEditController : public OmniboxEditController {
19 public: 20 public:
20 // Returns the WebContents of the currently active tab. 21 // Returns the WebContents of the currently active tab.
21 virtual content::WebContents* GetWebContents() = 0; 22 virtual content::WebContents* GetWebContents() = 0;
22 23
23 // Called when the the controller should update itself without restoring any 24 // Called when the the controller should update itself without restoring any
24 // tab state. 25 // tab state.
25 virtual void UpdateWithoutTabRestore() = 0; 26 virtual void UpdateWithoutTabRestore() = 0;
26 27
28 // Called when omnibox focus was changed.
29 virtual void OnFocusChanged(OmniboxFocusState state) = 0;
30
27 CommandUpdater* command_updater() { return command_updater_; } 31 CommandUpdater* command_updater() { return command_updater_; }
28 const CommandUpdater* command_updater() const { return command_updater_; } 32 const CommandUpdater* command_updater() const { return command_updater_; }
29 33
30 protected: 34 protected:
31 explicit ChromeOmniboxEditController(CommandUpdater* command_updater); 35 explicit ChromeOmniboxEditController(CommandUpdater* command_updater);
32 ~ChromeOmniboxEditController() override; 36 ~ChromeOmniboxEditController() override;
33 37
34 private: 38 private:
35 // OmniboxEditController: 39 // OmniboxEditController:
36 void OnAutocompleteAccept(const GURL& destination_url, 40 void OnAutocompleteAccept(const GURL& destination_url,
37 WindowOpenDisposition disposition, 41 WindowOpenDisposition disposition,
38 ui::PageTransition transition, 42 ui::PageTransition transition,
39 AutocompleteMatchType::Type type) override; 43 AutocompleteMatchType::Type type) override;
40 void OnInputInProgress(bool in_progress) override; 44 void OnInputInProgress(bool in_progress) override;
41 45
42 CommandUpdater* command_updater_; 46 CommandUpdater* command_updater_;
43 47
44 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxEditController); 48 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxEditController);
45 }; 49 };
46 50
47 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_ 51 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/chrome_omnibox_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698