blob: 9fbd333b92807a1cbf4d61032fb97962712bc28d [file] [log] [blame]
// Copyright 2018 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/autofill/autofill_popup_controller_impl.h"
@class WebTextfieldTouchBarController;
namespace autofill {
class AutofillPopupControllerImplMac : public AutofillPopupControllerImpl {
AutofillPopupControllerImplMac(base::WeakPtr<AutofillPopupDelegate> delegate,
content::WebContents* web_contents,
gfx::NativeView container_view,
const gfx::RectF& element_bounds,
base::i18n::TextDirection text_direction);
~AutofillPopupControllerImplMac() override;
// Shows the popup, or updates the existing popup with the given values.
// If the popup contains credit card items, find and set
// |touchBarController_| and show the credit card autofill touch bar.
void Show(const std::vector<autofill::Suggestion>& suggestions,
bool autoselect_first_suggestion,
PopupType popup_type) override;
// Updates the data list values currently shown with the popup. Calls
// -invalidateTouchBar from |touchBarController_|.
void UpdateDataListValues(const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) override;
// Hides the popup and destroys the controller. This also invalidates
// |delegate_|.
void Hide() override;
// The controller providing the autofill touch bar.
WebTextfieldTouchBarController* touch_bar_controller_; // weak.
// True if the popup contains credit card items.
BOOL is_credit_card_popup_;
} // namespace autofill