Chromium Code Reviews| Index: chrome/browser/ui/android/infobars/tabbed_mode_opt_in_infobar_delegate.h |
| diff --git a/chrome/browser/ui/android/infobars/tabbed_mode_opt_in_infobar_delegate.h b/chrome/browser/ui/android/infobars/tabbed_mode_opt_in_infobar_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..526ae3b51741f9ace801bf45e6248f4f976fde97 |
| --- /dev/null |
| +++ b/chrome/browser/ui/android/infobars/tabbed_mode_opt_in_infobar_delegate.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_TABBED_MODE_OPT_IN_INFOBAR_DELEGATE_H_ |
| +#define CHROME_BROWSER_UI_ANDROID_INFOBARS_TABBED_MODE_OPT_IN_INFOBAR_DELEGATE_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/macros.h" |
| +#include "components/infobars/core/confirm_infobar_delegate.h" |
| + |
| +namespace content { |
| +class WebContents; |
| +} |
| + |
| +// An InfoBar delegate that asks to opt in tabbed mode for the devices that |
|
gone
2015/11/17 23:18:16
nits: InfoBarDelegate. opt-in. Finish the senten
Kibeom Kim (inactive)
2015/11/20 11:44:15
Done.
|
| +// document mode is inconvenient |
| +class TabbedModeOptInInfoBarDelegate : public ConfirmInfoBarDelegate { |
| + public: |
| + static bool RegisterTabbedModeOptInInfoBarDelegate(JNIEnv* env); |
| + |
| + TabbedModeOptInInfoBarDelegate(JNIEnv* env, jobject obj); |
| + ~TabbedModeOptInInfoBarDelegate() override; |
| + |
| + private: |
| + // InfoBarDelegate: |
| + int GetIconId() const override; |
| + bool ShouldExpire(const NavigationDetails& details) const override; |
| + void InfoBarDismissed() override; |
| + |
| + // ConfirmInfoBarDelegate: |
| + base::string16 GetMessageText() const override; |
| + int GetButtons() const override; |
| + base::string16 GetButtonLabel(InfoBarButton button) const override; |
| + bool Accept() override; |
| + bool Cancel() override; |
| + |
| + base::android::ScopedJavaGlobalRef<jobject> j_delegate_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TabbedModeOptInInfoBarDelegate); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_TABBED_MODE_OPT_IN_INFOBAR_DELEGATE_H_ |