summaryrefslogtreecommitdiffstats
path: root/chrome/browser/android/tab_android_test_stubs.cc
blob: 414ca101a3523cc4cf99ed46315a2738853fc297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) 2012 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.

// This file contains stubs for some Chrome for Android specific code that is
// 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"

// static
TabAndroid* TabAndroid::FromWebContents(content::WebContents* web_contents) {
  return NULL;
}

// static
TabAndroid* TabAndroid::GetNativeTab(JNIEnv* env, jobject obj) {
  return NULL;
}

// AutoLoginInfoBarDelegatAndroid empty implementation for test_shell.
// TODO(miguelg) remove once the AutoLoginInfoBar is upstreamed.
AutoLoginInfoBarDelegateAndroid::AutoLoginInfoBarDelegateAndroid(
    InfoBarService* owner,
    const AutoLoginInfoBarDelegate::Params& params)
    : AutoLoginInfoBarDelegate(owner, params), params_() {}

AutoLoginInfoBarDelegateAndroid::~AutoLoginInfoBarDelegateAndroid() {}

bool AutoLoginInfoBarDelegateAndroid::Accept() {
  return false;
}

bool AutoLoginInfoBarDelegateAndroid::Cancel() {
  return false;
}

base::string16 AutoLoginInfoBarDelegateAndroid::GetMessageText() const {
  return base::string16();
}

// static
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;
}