| OLD | NEW |
| 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 "components/omnibox/browser/omnibox_edit_controller.h" | 8 #include "components/omnibox/browser/omnibox_edit_controller.h" |
| 9 | 9 |
| 10 class CommandUpdater; | 10 class CommandUpdater; |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class WebContents; | 13 class WebContents; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // Chrome-specific extension of the OmniboxEditController base class. | 16 // Chrome-specific extension of the OmniboxEditController base class. |
| 17 class ChromeOmniboxEditController : public OmniboxEditController { | 17 class ChromeOmniboxEditController : public OmniboxEditController { |
| 18 public: | 18 public: |
| 19 // Returns the WebContents of the currently active tab. | 19 // Returns the WebContents of the currently active tab. |
| 20 virtual content::WebContents* GetWebContents() = 0; | 20 virtual content::WebContents* GetWebContents() = 0; |
| 21 | 21 |
| 22 // Called when the the controller should update itself without restoring any |
| 23 // tab state. |
| 24 virtual void UpdateWithoutTabRestore() = 0; |
| 25 |
| 22 CommandUpdater* command_updater() { return command_updater_; } | 26 CommandUpdater* command_updater() { return command_updater_; } |
| 23 const CommandUpdater* command_updater() const { return command_updater_; } | 27 const CommandUpdater* command_updater() const { return command_updater_; } |
| 24 | 28 |
| 25 protected: | 29 protected: |
| 26 explicit ChromeOmniboxEditController(CommandUpdater* command_updater); | 30 explicit ChromeOmniboxEditController(CommandUpdater* command_updater); |
| 27 ~ChromeOmniboxEditController() override; | 31 ~ChromeOmniboxEditController() override; |
| 28 | 32 |
| 29 private: | 33 private: |
| 30 // OmniboxEditController: | 34 // OmniboxEditController: |
| 31 void OnAutocompleteAccept(const GURL& destination_url, | 35 void OnAutocompleteAccept(const GURL& destination_url, |
| 32 WindowOpenDisposition disposition, | 36 WindowOpenDisposition disposition, |
| 33 ui::PageTransition transition) override; | 37 ui::PageTransition transition) override; |
| 38 void OnInputInProgress(bool in_progress) override; |
| 34 | 39 |
| 35 CommandUpdater* command_updater_; | 40 CommandUpdater* command_updater_; |
| 36 | 41 |
| 37 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxEditController); | 42 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxEditController); |
| 38 }; | 43 }; |
| 39 | 44 |
| 40 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_ | 45 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_ |
| OLD | NEW |