| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/tab_model/tab_model_base.h" | 5 #include "chrome/browser/ui/android/tab_model/tab_model_base.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/android/jni_weak_ref.h" | 9 #include "base/android/jni_weak_ref.h" |
| 10 #include "chrome/browser/android/tab_android.h" | 10 #include "chrome/browser/android/tab_android.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 133 } |
| 134 return tab->web_contents(); | 134 return tab->web_contents(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool TabModelBase::IsSessionRestoreInProgress() const { | 137 bool TabModelBase::IsSessionRestoreInProgress() const { |
| 138 JNIEnv* env = AttachCurrentThread(); | 138 JNIEnv* env = AttachCurrentThread(); |
| 139 return Java_TabModelBase_isSessionRestoreInProgress( | 139 return Java_TabModelBase_isSessionRestoreInProgress( |
| 140 env, java_object_.get(env).obj()); | 140 env, java_object_.get(env).obj()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void TabModelBase::OpenClearBrowsingData() const { | |
| 144 JNIEnv* env = AttachCurrentThread(); | |
| 145 Java_TabModelBase_openClearBrowsingData(env, | |
| 146 java_object_.get(env).obj()); | |
| 147 } | |
| 148 | |
| 149 void TabModelBase::BroadcastSessionRestoreComplete(JNIEnv* env, | 143 void TabModelBase::BroadcastSessionRestoreComplete(JNIEnv* env, |
| 150 jobject obj) { | 144 jobject obj) { |
| 151 TabModel::BroadcastSessionRestoreComplete(); | 145 TabModel::BroadcastSessionRestoreComplete(); |
| 152 } | 146 } |
| 153 | 147 |
| 154 TabModelBase::~TabModelBase() { | 148 TabModelBase::~TabModelBase() { |
| 155 } | 149 } |
| 156 | 150 |
| 157 namespace { | 151 namespace { |
| 158 | 152 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 180 TabModel* tab_model = new TabModelBase(env, obj, profile); | 174 TabModel* tab_model = new TabModelBase(env, obj, profile); |
| 181 TabModelList::AddTabModel(tab_model); | 175 TabModelList::AddTabModel(tab_model); |
| 182 return reinterpret_cast<intptr_t>(tab_model); | 176 return reinterpret_cast<intptr_t>(tab_model); |
| 183 } | 177 } |
| 184 | 178 |
| 185 // Register native methods | 179 // Register native methods |
| 186 | 180 |
| 187 bool RegisterTabModelBase(JNIEnv* env) { | 181 bool RegisterTabModelBase(JNIEnv* env) { |
| 188 return RegisterNativesImpl(env); | 182 return RegisterNativesImpl(env); |
| 189 } | 183 } |
| OLD | NEW |