OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELEGAT
E_H_ |
| 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELEGAT
E_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/string16.h" |
| 10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 11 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 12 |
| 13 class SkBitmap; |
| 14 class TabContents; |
| 15 |
| 16 // An InfoBar delegate that enables the user to allow or deny storing credit |
| 17 // card information gathered from a form submission. |
| 18 class RegisterProtocolHandlerInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 19 public: |
| 20 RegisterProtocolHandlerInfoBarDelegate(TabContents* tab_contents, |
| 21 ProtocolHandlerRegistry* registry, |
| 22 ProtocolHandler* handler); |
| 23 |
| 24 // ConfirmInfoBarDelegate implementation. |
| 25 virtual bool ShouldExpire(const NavigationController::LoadCommittedDetails& |
| 26 details) const OVERRIDE; |
| 27 virtual void InfoBarClosed() OVERRIDE; |
| 28 virtual string16 GetMessageText() const OVERRIDE; |
| 29 virtual SkBitmap* GetIcon() const OVERRIDE; |
| 30 virtual int GetButtons() const OVERRIDE; |
| 31 virtual string16 GetButtonLabel( |
| 32 ConfirmInfoBarDelegate::InfoBarButton button) const OVERRIDE; |
| 33 virtual bool Accept() OVERRIDE; |
| 34 virtual bool Cancel() OVERRIDE; |
| 35 virtual string16 GetLinkText() OVERRIDE; |
| 36 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 37 virtual Type GetInfoBarType() OVERRIDE; |
| 38 |
| 39 static void AttemptRegisterProtocolHandler(TabContents* tab_contents, |
| 40 ProtocolHandlerRegistry* registry, |
| 41 ProtocolHandler* handler); |
| 42 |
| 43 private: |
| 44 TabContents* tab_contents_; |
| 45 ProtocolHandlerRegistry* registry_; |
| 46 ProtocolHandler* handler_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerInfoBarDelegate); |
| 49 }; |
| 50 |
| 51 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELE
GATE_H_ |
OLD | NEW |