Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / infobars / insecure_content_infobar_delegate.h
blob6544ea1b7e1ff4818c0b30a7d332a4a12e3db1f8
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_INFOBARS_INSECURE_CONTENT_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_INFOBARS_INSECURE_CONTENT_INFOBAR_DELEGATE_H_
8 #include "components/infobars/core/confirm_infobar_delegate.h"
10 class InfoBarService;
12 // Base class for delegates that show warnings on HTTPS pages which try to
13 // display or run insecure content.
14 class InsecureContentInfoBarDelegate : public ConfirmInfoBarDelegate {
15 public:
16 // Creates an insecure content infobar and delegate and adds the infobar to
17 // |infobar_service|, replacing any existing insecure content infobar.
18 static void Create(InfoBarService* infobar_service);
20 private:
21 enum HistogramEvents {
22 DISPLAY_INFOBAR_SHOWN = 0, // Infobar was displayed.
23 DISPLAY_USER_OVERRIDE, // User clicked allow anyway button.
24 DISPLAY_USER_DID_NOT_LOAD, // User clicked the don't load button.
25 DISPLAY_INFOBAR_DISMISSED, // User clicked close button.
26 NUM_EVENTS
29 InsecureContentInfoBarDelegate();
30 ~InsecureContentInfoBarDelegate() override;
32 // ConfirmInfoBarDelegate:
33 void InfoBarDismissed() override;
34 InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate() override;
35 base::string16 GetMessageText() const override;
36 base::string16 GetButtonLabel(InfoBarButton button) const override;
37 bool Accept() override;
38 bool Cancel() override;
39 base::string16 GetLinkText() const override;
40 bool LinkClicked(WindowOpenDisposition disposition) override;
42 DISALLOW_COPY_AND_ASSIGN(InsecureContentInfoBarDelegate);
45 #endif // CHROME_BROWSER_INFOBARS_INSECURE_CONTENT_INFOBAR_DELEGATE_H_