| Index: chrome/browser/password_manager/password_manager_infobar_delegate.h
|
| diff --git a/chrome/browser/password_manager/password_manager_infobar_delegate.h b/chrome/browser/password_manager/password_manager_infobar_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3c4748faa5ed3fdb168d2f1935fc429a68be5a22
|
| --- /dev/null
|
| +++ b/chrome/browser/password_manager/password_manager_infobar_delegate.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
|
| +#define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
|
| +
|
| +#include "components/infobars/core/confirm_infobar_delegate.h"
|
| +#include "ui/gfx/range/range.h"
|
| +
|
| +// Base class for some of the password manager infobar delegates, e.g.
|
| +// SavePasswordInfoBarDelegate.
|
| +class PasswordManagerInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| + public:
|
| + ~PasswordManagerInfoBarDelegate() override;
|
| +
|
| + const gfx::Range& message_link_range() const { return message_link_range_; }
|
| +
|
| + // ConfirmInfoBarDelegate:
|
| + Type GetInfoBarType() const override;
|
| + InfoBarAutomationType GetInfoBarAutomationType() const override;
|
| + int GetIconId() const override;
|
| + bool ShouldExpire(const NavigationDetails& details) const override;
|
| + base::string16 GetMessageText() const override;
|
| + bool LinkClicked(WindowOpenDisposition disposition) override;
|
| +
|
| + protected:
|
| + PasswordManagerInfoBarDelegate();
|
| +
|
| + void SetMessage(const base::string16& message);
|
| + void SetMessageLinkRange(const gfx::Range& message_link_range);
|
| +
|
| + private:
|
| + // Message for the infobar: branded as a part of Google Smart Lock for signed
|
| + // users.
|
| + base::string16 message_;
|
| +
|
| + // If set, describes the location of the link to the help center article for
|
| + // Smart Lock.
|
| + gfx::Range message_link_range_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PasswordManagerInfoBarDelegate);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
|
|
|