Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_edit_controller.cc |
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_controller.cc b/chrome/browser/ui/omnibox/omnibox_edit_controller.cc |
| index 43987fcc40156c698d1c6f36b89892d8ecff8293..0d2c22a9f485589b07d7381f1927bcc9180872a9 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_controller.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_controller.cc |
| @@ -6,6 +6,7 @@ |
| #include "chrome/app/chrome_command_ids.h" |
| #include "chrome/browser/command_updater.h" |
| +#include "chrome/browser/ui/toolbar/toolbar_model.h" |
| void OmniboxEditController::OnAutocompleteAccept( |
| const GURL& destination_url, |
| @@ -26,5 +27,19 @@ OmniboxEditController::OmniboxEditController(CommandUpdater* command_updater) |
| content::PAGE_TRANSITION_FROM_ADDRESS_BAR)) { |
| } |
| +void OmniboxEditController::HideOriginChip() { |
| + GetToolbarModel()->set_origin_chip_enabled(false); |
| + OnChanged(); |
| +} |
| + |
| +void OmniboxEditController::ShowOriginChip() { |
| + if (GetToolbarModel()->url_replacement_enabled()) { |
|
Peter Kasting
2014/03/21 21:22:10
I'm not really clear on what this conditional is d
Justin Donnelly
2014/03/24 22:59:37
This handles the two states we end up in after eit
|
| + GetToolbarModel()->set_origin_chip_enabled(true); |
| + OnChanged(); |
| + } else { |
| + HideURL(); |
| + } |
| +} |
| + |
| OmniboxEditController::~OmniboxEditController() { |
| } |