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

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

Issue 1150193004: Straighten up life cycle of native InfoBar pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unrelated file Created 5 years, 6 months 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/translate/chrome_translate_client.h" 10 #include "chrome/browser/translate/chrome_translate_client.h"
(...skipping 17 matching lines...) Expand all
28 bool always_translate, 28 bool always_translate,
29 bool never_translate_language, 29 bool never_translate_language,
30 bool never_translate_site); 30 bool never_translate_site);
31 31
32 private: 32 private:
33 // InfoBarAndroid: 33 // InfoBarAndroid:
34 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( 34 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
35 JNIEnv* env) override; 35 JNIEnv* env) override;
36 void ProcessButton(int action, const std::string& action_value) override; 36 void ProcessButton(int action, const std::string& action_value) override;
37 void PassJavaInfoBar(InfoBarAndroid* source) override; 37 void PassJavaInfoBar(InfoBarAndroid* source) override;
38 void SetJavaInfoBar(
39 const base::android::JavaRef<jobject>& java_info_bar) override;
38 40
39 void TransferOwnership(TranslateInfoBar* destination, 41 void TransferOwnership(TranslateInfoBar* destination,
40 translate::TranslateStep new_type); 42 translate::TranslateStep new_type);
41 void SetJavaDelegate(jobject delegate);
42 bool ShouldDisplayNeverTranslateInfoBarOnCancel(); 43 bool ShouldDisplayNeverTranslateInfoBarOnCancel();
43 44
44 translate::TranslateInfoBarDelegate* GetDelegate(); 45 translate::TranslateInfoBarDelegate* GetDelegate();
45 46
46 base::android::ScopedJavaGlobalRef<jobject> java_translate_delegate_;
47
48 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBar); 47 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBar);
49 }; 48 };
50 49
51 // Registers the native methods through JNI. 50 // Registers the native methods through JNI.
52 bool RegisterTranslateInfoBarDelegate(JNIEnv* env); 51 bool RegisterTranslateInfoBarDelegate(JNIEnv* env);
53 52
54 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_ 53 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/save_password_infobar.cc ('k') | chrome/browser/ui/android/infobars/translate_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698