Chromium Code Reviews| Index: chrome/browser/android/tab_android.cc |
| diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc |
| index e317c04d11a9aa1357a4cb6ef3475a95701b920a..91288103f6c884c556c4d9682a1796bfb4024f17 100644 |
| --- a/chrome/browser/android/tab_android.cc |
| +++ b/chrome/browser/android/tab_android.cc |
| @@ -229,6 +229,41 @@ void TabAndroid::SetSyncId(int sync_id) { |
| Java_TabBase_setSyncId(env, obj.obj(), sync_id); |
| } |
| +void TabAndroid::HandlePopupNavigation(chrome::NavigateParams* params) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void TabAndroid::OnReceivedHttpAuthRequest(jobject auth_handler, |
| + const base::string16& host, |
| + const base::string16& realm) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void TabAndroid::AddShortcutToBookmark(const GURL& url, |
| + const base::string16& title, |
| + const SkBitmap& skbitmap, |
| + int r_value, |
| + int g_value, |
| + int b_value) { |
| + NOTREACHED(); |
| +} |
| + |
| +void TabAndroid::EditBookmark(int64 node_id, |
| + const base::string16& node_title, |
| + bool is_folder, |
| + bool is_partner_bookmark) { |
| + NOTREACHED(); |
| +} |
| + |
| +void TabAndroid::OnNewTabPageReady() { |
| + NOTREACHED(); |
| +} |
| + |
| +bool TabAndroid::ShouldWelcomePageLinkToTermsOfService() { |
| + NOTREACHED(); |
| + return false; |
| +} |
| + |
| void TabAndroid::SwapTabContents(content::WebContents* old_contents, |
| content::WebContents* new_contents) { |
| JNIEnv* env = base::android::AttachCurrentThread(); |
| @@ -286,6 +321,10 @@ void TabAndroid::Observe(int type, |
| } |
| } |
| +void TabAndroid::Destroy(JNIEnv* env, jobject obj) { |
| + delete this; |
| +} |
| + |
| void TabAndroid::InitWebContents(JNIEnv* env, |
| jobject obj, |
| jboolean incognito, |
| @@ -418,6 +457,13 @@ bool TabAndroid::Print(JNIEnv* env, jobject obj) { |
| return true; |
| } |
| +static void Init(JNIEnv* env, jobject obj) { |
| + TRACE_EVENT0("native", "TabAndroid::Init"); |
| + scoped_ptr<TabAndroid> tab(new TabAndroid(env, obj)); |
|
Yaron
2013/12/18 02:15:55
Why bother with the scoped_ptr at all? Just do: ne
David Trainor- moved to gerrit
2013/12/18 21:29:47
This felt cleaner and a little more safe (if thing
|
| + // This will automatically bind to the Java object and pass ownership there. |
| + ignore_result(tab.release()); |
| +} |
| + |
| bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { |
| return RegisterNativesImpl(env); |
| } |