Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: chrome/browser/ui/android/infobars/tabbed_mode_opt_in_infobar_delegate.h

Issue 1435263003: [Android] Show document mode opt-out InfoBar on selected devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed isOptedInToDocumentMode Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 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.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698