blob: 2bce04c3c064874efaa8430e26fbe6963fe14157 [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/omnibox/omnibox_tab_helper.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/location_bar/location_bar.h"
#include "components/omnibox/browser/omnibox_view.h"
WEB_CONTENTS_USER_DATA_KEY_IMPL(OmniboxTabHelper)
OmniboxTabHelper::~OmniboxTabHelper() = default;
OmniboxTabHelper::OmniboxTabHelper(content::WebContents* contents) {}
void OmniboxTabHelper::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
}
void OmniboxTabHelper::RemoveObserver(Observer* observer) {
observers_.RemoveObserver(observer);
}
void OmniboxTabHelper::OnInputStateChanged() {
for (auto& observer : observers_) {
observer.OnOmniboxInputStateChanged();
}
}
void OmniboxTabHelper::OnFocusChanged(OmniboxFocusState state,
OmniboxFocusChangeReason reason) {
for (auto& observer : observers_) {
observer.OnOmniboxFocusChanged(state, reason);
}
}