OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "base/string16.h" |
| 11 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
| 12 |
| 13 class TabContents; |
| 14 |
| 15 // The InfoBar used to request permission for a site to be registered as an |
| 16 // Intent handler. |
| 17 class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 18 public: |
| 19 // TODO(jhawkins): Pass in WebIntentData. |
| 20 explicit RegisterIntentHandlerInfoBarDelegate(TabContents* tab_contents); |
| 21 |
| 22 // ConfirmInfoBarDelegate implementation. |
| 23 virtual Type GetInfoBarType() const OVERRIDE; |
| 24 virtual string16 GetMessageText() const OVERRIDE; |
| 25 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 26 virtual string16 GetLinkText() const OVERRIDE; |
| 27 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
| 28 |
| 29 private: |
| 30 // The TabContents that contains this InfoBar. Weak pointer. |
| 31 TabContents* tab_contents_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(RegisterIntentHandlerInfoBarDelegate); |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_ |
OLD | NEW |