Home | History | Annotate | Download | only in android
      1 // Copyright (c) 2012 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 // This file contains stubs for some Chrome for Android specific code that is
      6 // needed to compile some tests.
      7 
      8 #include "chrome/browser/android/tab_android.h"
      9 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
     10 #include "chrome/browser/translate/translate_infobar_delegate.h"
     11 #include "chrome/browser/ui/auto_login_infobar_delegate.h"
     12 #include "chrome/browser/ui/auto_login_infobar_delegate_android.h"
     13 #include "printing/printing_context.h"
     14 #include "printing/printing_context_android.h"
     15 
     16 // static
     17 TabAndroid* TabAndroid::FromWebContents(content::WebContents* web_contents) {
     18   return NULL;
     19 }
     20 
     21 // static
     22 TabAndroid* TabAndroid::GetNativeTab(JNIEnv* env, jobject obj) {
     23   return NULL;
     24 }
     25 
     26 // AutoLoginInfoBarDelegatAndroid empty implementation for test_shell.
     27 // TODO(miguelg) remove once the AutoLoginInfoBar is upstreamed.
     28 AutoLoginInfoBarDelegateAndroid::AutoLoginInfoBarDelegateAndroid(
     29     InfoBarService* owner,
     30     const AutoLoginInfoBarDelegate::Params& params)
     31     : AutoLoginInfoBarDelegate(owner, params), params_() {}
     32 
     33 AutoLoginInfoBarDelegateAndroid::~AutoLoginInfoBarDelegateAndroid() {}
     34 
     35 bool AutoLoginInfoBarDelegateAndroid::Accept() {
     36   return false;
     37 }
     38 
     39 bool AutoLoginInfoBarDelegateAndroid::Cancel() {
     40   return false;
     41 }
     42 
     43 base::string16 AutoLoginInfoBarDelegateAndroid::GetMessageText() const {
     44   return base::string16();
     45 }
     46 
     47 // static
     48 bool AutoLoginInfoBarDelegateAndroid::Register(JNIEnv* env) {
     49   return false;
     50 }
     51 
     52 // static
     53 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
     54   NOTREACHED() << "ConfirmInfoBar: InfoBarFactory should be used on Android";
     55   return NULL;
     56 }
     57 
     58 // static
     59 InfoBar* TranslateInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
     60   return NULL;
     61 }
     62 
     63 // static
     64 printing::PrintingContext* printing::PrintingContext::Create(
     65     const std::string& app_locale) {
     66   return NULL;
     67 }
     68 
     69 // static
     70 void printing::PrintingContextAndroid::PdfWritingDone(int fd, bool success) {
     71 }
     72 
     73