| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELEGAT
E_H_ | 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_ | 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELEGAT
E_H_ |
| 7 | 7 |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
| 10 #include "chrome/common/custom_handlers/protocol_handler.h" | 10 #include "chrome/common/custom_handlers/protocol_handler.h" |
| 11 | 11 |
| 12 class InfoBarTabService; | 12 class InfoBarService; |
| 13 class ProtocolHandlerRegistry; | 13 class ProtocolHandlerRegistry; |
| 14 | 14 |
| 15 // An InfoBar delegate that enables the user to allow or deny storing credit | 15 // An InfoBar delegate that enables the user to allow or deny storing credit |
| 16 // card information gathered from a form submission. | 16 // card information gathered from a form submission. |
| 17 class RegisterProtocolHandlerInfoBarDelegate : public ConfirmInfoBarDelegate { | 17 class RegisterProtocolHandlerInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 18 public: | 18 public: |
| 19 RegisterProtocolHandlerInfoBarDelegate(InfoBarTabService* infobar_service, | 19 RegisterProtocolHandlerInfoBarDelegate(InfoBarService* infobar_service, |
| 20 ProtocolHandlerRegistry* registry, | 20 ProtocolHandlerRegistry* registry, |
| 21 const ProtocolHandler& handler); | 21 const ProtocolHandler& handler); |
| 22 | 22 |
| 23 // ConfirmInfoBarDelegate: | 23 // ConfirmInfoBarDelegate: |
| 24 virtual Type GetInfoBarType() const OVERRIDE; | 24 virtual Type GetInfoBarType() const OVERRIDE; |
| 25 virtual string16 GetMessageText() const OVERRIDE; | 25 virtual string16 GetMessageText() const OVERRIDE; |
| 26 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 26 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 27 virtual bool NeedElevation(InfoBarButton button) const OVERRIDE; | 27 virtual bool NeedElevation(InfoBarButton button) const OVERRIDE; |
| 28 virtual bool Accept() OVERRIDE; | 28 virtual bool Accept() OVERRIDE; |
| 29 virtual bool Cancel() OVERRIDE; | 29 virtual bool Cancel() OVERRIDE; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 40 private: | 40 private: |
| 41 // Returns a user-friendly name for the protocol of this protocol handler. | 41 // Returns a user-friendly name for the protocol of this protocol handler. |
| 42 string16 GetProtocolName(const ProtocolHandler& handler) const; | 42 string16 GetProtocolName(const ProtocolHandler& handler) const; |
| 43 ProtocolHandlerRegistry* registry_; | 43 ProtocolHandlerRegistry* registry_; |
| 44 ProtocolHandler handler_; | 44 ProtocolHandler handler_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerInfoBarDelegate); | 46 DISALLOW_COPY_AND_ASSIGN(RegisterProtocolHandlerInfoBarDelegate); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELE
GATE_H_ | 49 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_REGISTER_PROTOCOL_HANDLER_INFOBAR_DELE
GATE_H_ |
| OLD | NEW |