| Index: chrome/browser/android/tab_android.cc
|
| diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
|
| index 3c0c45072a573d8465d97a878f00facd646279ed..ce9805affb9e049e3cf6030466b3a2140a5fe997 100644
|
| --- a/chrome/browser/android/tab_android.cc
|
| +++ b/chrome/browser/android/tab_android.cc
|
| @@ -21,6 +21,7 @@
|
| #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h"
|
| #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h"
|
| #include "chrome/browser/prerender/prerender_tab_helper.h"
|
| +#include "chrome/browser/printing/print_view_manager_basic.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_android.h"
|
| #include "chrome/browser/sessions/session_tab_helper.h"
|
| @@ -399,6 +400,20 @@ void TabAndroid::SetActiveNavigationEntryTitleForUrl(JNIEnv* env,
|
| entry->SetTitle(title);
|
| }
|
|
|
| +bool TabAndroid::Print(JNIEnv* env, jobject obj) {
|
| + if (!web_contents())
|
| + return false;
|
| +
|
| + printing::PrintViewManagerBasic::CreateForWebContents(web_contents());
|
| + printing::PrintViewManagerBasic* print_view_manager =
|
| + printing::PrintViewManagerBasic::FromWebContents(web_contents());
|
| + if (print_view_manager == NULL)
|
| + return false;
|
| +
|
| + print_view_manager->PrintNow();
|
| + return true;
|
| +}
|
| +
|
| bool TabAndroid::RegisterTabAndroid(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
|
|