| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 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_UI_ANDROID_INFOBARS_TABBED_MODE_OPT_IN_INFOBAR_DELEGATE_H
_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TABBED_MODE_OPT_IN_INFOBAR_DELEGATE_H
_ |
| 7 |
| 8 #include <jni.h> |
| 9 |
| 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/macros.h" |
| 12 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 13 |
| 14 namespace content { |
| 15 class WebContents; |
| 16 } |
| 17 |
| 18 // An InfoBarDelegate that asks to opt-in tabbed mode for the devices that |
| 19 // document mode is inconvenient. |
| 20 class TabbedModeOptInInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 21 public: |
| 22 static bool RegisterTabbedModeOptInInfoBarDelegate(JNIEnv* env); |
| 23 |
| 24 TabbedModeOptInInfoBarDelegate(JNIEnv* env, jobject obj); |
| 25 ~TabbedModeOptInInfoBarDelegate() override; |
| 26 |
| 27 private: |
| 28 // InfoBarDelegate: |
| 29 int GetIconId() const override; |
| 30 bool ShouldExpire(const NavigationDetails& details) const override; |
| 31 void InfoBarDismissed() override; |
| 32 |
| 33 // ConfirmInfoBarDelegate: |
| 34 base::string16 GetMessageText() const override; |
| 35 int GetButtons() const override; |
| 36 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 37 bool Accept() override; |
| 38 bool Cancel() override; |
| 39 |
| 40 base::android::ScopedJavaGlobalRef<jobject> j_delegate_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(TabbedModeOptInInfoBarDelegate); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_TABBED_MODE_OPT_IN_INFOBAR_DELEGAT
E_H_ |
| OLD | NEW |