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

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

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review comments Created 6 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 | Annotate | Revision Log
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 #include "chrome/browser/ui/android/infobars/translate_infobar.h" 5 #include "chrome/browser/ui/android/infobars/translate_infobar.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_weak_ref.h" 9 #include "base/android/jni_weak_ref.h"
10 #include "chrome/browser/translate/translate_infobar_delegate.h" 10 #include "chrome/browser/translate/translate_tab_helper.h"
11 #include "components/translate/core/browser/translate_infobar_delegate.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 #include "jni/TranslateInfoBarDelegate_jni.h" 13 #include "jni/TranslateInfoBarDelegate_jni.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 15
15 16
16 // TranslateInfoBarDelegate --------------------------------------------------- 17 // TranslateTabHelper ----------------------------------------------------------
17 18
18 // static 19 scoped_ptr<infobars::InfoBar> TranslateTabHelper::CreateInfoBar(
19 scoped_ptr<infobars::InfoBar> TranslateInfoBarDelegate::CreateInfoBar( 20 scoped_ptr<TranslateInfoBarDelegate> delegate) const {
20 scoped_ptr<TranslateInfoBarDelegate> delegate) {
21 return scoped_ptr<infobars::InfoBar>(new TranslateInfoBar(delegate.Pass())); 21 return scoped_ptr<infobars::InfoBar>(new TranslateInfoBar(delegate.Pass()));
22 } 22 }
23 23
24 24
25 // TranslateInfoBar ----------------------------------------------------------- 25 // TranslateInfoBar -----------------------------------------------------------
26 26
27 TranslateInfoBar::TranslateInfoBar( 27 TranslateInfoBar::TranslateInfoBar(
28 scoped_ptr<TranslateInfoBarDelegate> delegate) 28 scoped_ptr<TranslateInfoBarDelegate> delegate)
29 : InfoBarAndroid(delegate.PassAs<infobars::InfoBarDelegate>()), 29 : InfoBarAndroid(delegate.PassAs<infobars::InfoBarDelegate>()),
30 java_translate_delegate_() { 30 java_translate_delegate_() {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 TranslateInfoBarDelegate* TranslateInfoBar::GetDelegate() { 131 TranslateInfoBarDelegate* TranslateInfoBar::GetDelegate() {
132 return delegate()->AsTranslateInfoBarDelegate(); 132 return delegate()->AsTranslateInfoBarDelegate();
133 } 133 }
134 134
135 135
136 // Native JNI methods --------------------------------------------------------- 136 // Native JNI methods ---------------------------------------------------------
137 137
138 bool RegisterTranslateInfoBarDelegate(JNIEnv* env) { 138 bool RegisterTranslateInfoBarDelegate(JNIEnv* env) {
139 return RegisterNativesImpl(env); 139 return RegisterNativesImpl(env);
140 } 140 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/infobar_android.cc ('k') | chrome/browser/ui/cocoa/infobars/translate_infobar_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698