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

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

Issue 2762393003: Creates translate_compact_infobar class, which holds the logic for the new translate UI (Closed)
Patch Set: a Created 3 years, 8 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
(Empty)
1 // Copyright 2017 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_TRANSLATE_COMPACT_INFOBAR_H_
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_COMPACT_INFOBAR_H_
7
8 #include "base/android/scoped_java_ref.h"
9 #include "base/macros.h"
10 #include "chrome/browser/translate/chrome_translate_client.h"
11 #include "chrome/browser/ui/android/infobars/infobar_android.h"
12
13 namespace translate {
14 class TranslateInfoBarDelegate;
15 }
16
17 class TranslateCompactInfoBar : public InfoBarAndroid {
18 public:
19 explicit TranslateCompactInfoBar(
20 std::unique_ptr<translate::TranslateInfoBarDelegate> delegate);
21 ~TranslateCompactInfoBar() override;
22
23 // JNI methods specific to translate.
24 void ApplyTranslateOptions(JNIEnv* env,
25 const base::android::JavaParamRef<jobject>& obj);
26
27 private:
28 // InfoBarAndroid:
29 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
30 JNIEnv* env) override;
31 void ProcessButton(int action) override;
32 void SetJavaInfoBar(
33 const base::android::JavaRef<jobject>& java_info_bar) override;
34
35 translate::TranslateInfoBarDelegate* GetDelegate();
36
37 DISALLOW_COPY_AND_ASSIGN(TranslateCompactInfoBar);
38 };
39
40 // Registers the native methods through JNI.
41 bool RegisterTranslateCompactInfoBar(JNIEnv* env);
42
43 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/android/infobars/translate_compact_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698