OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ | |
6 #define CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ | |
7 | |
8 #include "base/android/jni_android.h" | |
9 #include "base/strings/string16.h" | |
10 #include "components/infobars/core/confirm_infobar_delegate.h" | |
11 #include "components/infobars/core/infobar_delegate.h" | |
12 | |
13 class InfoBarService; | |
14 | |
15 class InstantAppsInfoBarDelegate : public ConfirmInfoBarDelegate { | |
16 public: | |
17 ~InstantAppsInfoBarDelegate() override; | |
18 | |
19 static void Create(InfoBarService* infobar_service, | |
20 jobject jdata); | |
21 base::android::ScopedJavaGlobalRef<jobject> data() { return data_; } | |
Peter Kasting
2016/08/24 04:04:06
Nit: I'd put a blank line above this
Maria
2016/08/24 17:53:49
Done.
| |
22 | |
23 private: | |
24 explicit InstantAppsInfoBarDelegate(jobject jdata); | |
25 | |
26 // ConfirmInfoBarDelegate: | |
27 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const; | |
28 base::string16 GetMessageText() const; | |
29 bool Accept(); | |
30 | |
31 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; | |
32 base::android::ScopedJavaGlobalRef<jobject> data_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(InstantAppsInfoBarDelegate); | |
35 }; | |
36 | |
37 // Register native methods. | |
38 bool RegisterInstantAppsInfoBarDelegate(JNIEnv* env); | |
39 | |
40 #endif // CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_INFOBAR_DELEGATE_H_ | |
OLD | NEW |