summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/android/testshell/testshell_stubs.cc12
-rw-r--r--chrome/browser/android/infobar_stubs.cc18
-rw-r--r--chrome/browser/android/tab_android_test_stubs.cc12
-rw-r--r--chrome/browser/infobars/infobar.cc4
-rw-r--r--chrome/browser/infobars/infobar.h2
-rw-r--r--chrome/browser/infobars/infobar_container.cc4
-rw-r--r--chrome/chrome_browser.gypi1
7 files changed, 29 insertions, 24 deletions
diff --git a/chrome/android/testshell/testshell_stubs.cc b/chrome/android/testshell/testshell_stubs.cc
index fe10afb..b271b31 100644
--- a/chrome/android/testshell/testshell_stubs.cc
+++ b/chrome/android/testshell/testshell_stubs.cc
@@ -5,6 +5,7 @@
#include "base/strings/string16.h"
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/translate/translate_infobar_delegate.h"
#include "chrome/browser/ui/auto_login_infobar_delegate.h"
#include "chrome/browser/ui/auto_login_infobar_delegate_android.h"
@@ -45,3 +46,14 @@ base::string16 AutoLoginInfoBarDelegateAndroid::GetMessageText() const {
bool AutoLoginInfoBarDelegateAndroid::Register(JNIEnv* env) {
return false;
}
+
+// static
+InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
+ NOTREACHED() << "ConfirmInfoBar: InfoBarFactory should be used on Android";
+ return NULL;
+}
+
+// static
+InfoBar* TranslateInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
+ return NULL;
+}
diff --git a/chrome/browser/android/infobar_stubs.cc b/chrome/browser/android/infobar_stubs.cc
deleted file mode 100644
index 9316a7b..0000000
--- a/chrome/browser/android/infobar_stubs.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/infobars/confirm_infobar_delegate.h"
-#include "chrome/browser/translate/translate_infobar_delegate.h"
-
-// Clank implementations of cross-platform API, never used
-// since infobars are created using the InfoBarFactory but we need
-// them implemented so the binary links both upstream and downstream.
-InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
- NOTREACHED() << "ConfirmInfoBar: InfoBarFactory should be used on Android";
- return NULL;
-}
-
-InfoBar* TranslateInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
- return NULL;
-}
diff --git a/chrome/browser/android/tab_android_test_stubs.cc b/chrome/browser/android/tab_android_test_stubs.cc
index af0dac2..b26ae5f 100644
--- a/chrome/browser/android/tab_android_test_stubs.cc
+++ b/chrome/browser/android/tab_android_test_stubs.cc
@@ -6,6 +6,8 @@
// needed to compile some tests.
#include "chrome/browser/android/tab_android.h"
+#include "chrome/browser/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/translate/translate_infobar_delegate.h"
#include "chrome/browser/ui/auto_login_infobar_delegate.h"
#include "chrome/browser/ui/auto_login_infobar_delegate_android.h"
@@ -45,3 +47,13 @@ bool AutoLoginInfoBarDelegateAndroid::Register(JNIEnv* env) {
return false;
}
+// static
+InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
+ NOTREACHED() << "ConfirmInfoBar: InfoBarFactory should be used on Android";
+ return NULL;
+}
+
+// static
+InfoBar* TranslateInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
+ return NULL;
+}
diff --git a/chrome/browser/infobars/infobar.cc b/chrome/browser/infobars/infobar.cc
index 8a37ced..079b571 100644
--- a/chrome/browser/infobars/infobar.cc
+++ b/chrome/browser/infobars/infobar.cc
@@ -37,7 +37,7 @@ SkColor GetInfoBarBottomColor(InfoBarDelegate::Type infobar_type) {
}
// TODO(pkasting): Port Mac to use this.
-#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK)
+#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
InfoBar::InfoBar(InfoBarService* owner, InfoBarDelegate* delegate)
: owner_(owner),
@@ -188,4 +188,4 @@ void InfoBar::MaybeDelete() {
}
}
-#endif // TOOLKIT_VIEWS || TOOLKIT_GTK
+#endif // TOOLKIT_VIEWS || TOOLKIT_GTK || OS_ANDROID
diff --git a/chrome/browser/infobars/infobar.h b/chrome/browser/infobars/infobar.h
index eab823e..1c0fbb9 100644
--- a/chrome/browser/infobars/infobar.h
+++ b/chrome/browser/infobars/infobar.h
@@ -27,7 +27,7 @@ typedef std::pair<InfoBarDelegate*, bool> InfoBarRemovedDetails;
typedef std::pair<InfoBarDelegate*, InfoBarDelegate*> InfoBarReplacedDetails;
// TODO(pkasting): Port Mac to use this.
-#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK)
+#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
class InfoBarContainer;
class InfoBarService;
diff --git a/chrome/browser/infobars/infobar_container.cc b/chrome/browser/infobars/infobar_container.cc
index bb13a07..9b8ce11 100644
--- a/chrome/browser/infobars/infobar_container.cc
+++ b/chrome/browser/infobars/infobar_container.cc
@@ -5,7 +5,7 @@
#include "build/build_config.h"
// TODO(pkasting): Port Mac to use this.
-#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK)
+#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
#include "chrome/browser/infobars/infobar_container.h"
@@ -265,4 +265,4 @@ int InfoBarContainer::ArrowTargetHeightForInfoBar(size_t infobar_index) const {
first_infobar_animation.GetCurrentValue());
}
-#endif // TOOLKIT_VIEWS || defined(TOOLKIT_GTK)
+#endif // TOOLKIT_VIEWS || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 381db83..ebd3125 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -103,7 +103,6 @@
'browser/android/favicon_helper.cc',
'browser/android/favicon_helper.h',
'browser/android/google_location_settings_helper.h',
- 'browser/android/infobar_stubs.cc',
'browser/android/intent_helper.cc',
'browser/android/intent_helper.h',
'browser/android/intercept_download_resource_throttle.cc',