Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/android/testshell/testshell_tab.h" | 5 #include "chrome/android/testshell/testshell_tab.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" | 9 #include "chrome/browser/android/chrome_web_contents_delegate_android.h" |
| 10 #include "chrome/browser/ui/android/window_android_helper.h" | 10 #include "chrome/browser/ui/android/window_android_helper.h" |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 using ui::WindowAndroid; | 24 using ui::WindowAndroid; |
| 25 | 25 |
| 26 TestShellTab::TestShellTab(JNIEnv* env, | 26 TestShellTab::TestShellTab(JNIEnv* env, |
| 27 jobject obj) | 27 jobject obj) |
| 28 : TabAndroid(env, obj) { | 28 : TabAndroid(env, obj) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 TestShellTab::~TestShellTab() { | 31 TestShellTab::~TestShellTab() { |
| 32 } | 32 } |
| 33 | 33 |
| 34 void TestShellTab::Destroy(JNIEnv* env, jobject obj) { | |
| 35 delete this; | |
| 36 } | |
| 37 | |
| 38 void TestShellTab::OnReceivedHttpAuthRequest(jobject auth_handler, | |
| 39 const string16& host, | |
| 40 const string16& realm) { | |
| 41 NOTIMPLEMENTED(); | |
| 42 } | |
| 43 | |
| 44 void TestShellTab::AddShortcutToBookmark( | |
| 45 const GURL& url, const string16& title, const SkBitmap& skbitmap, | |
| 46 int r_value, int g_value, int b_value) { | |
| 47 NOTIMPLEMENTED(); | |
| 48 } | |
| 49 | |
| 50 void TestShellTab::EditBookmark(int64 node_id, | |
| 51 const base::string16& node_title, | |
| 52 bool is_folder, | |
| 53 bool is_partner_bookmark) { | |
| 54 NOTIMPLEMENTED(); | |
| 55 } | |
| 56 | |
| 57 bool TestShellTab::ShouldWelcomePageLinkToTermsOfService() { | |
| 58 NOTIMPLEMENTED(); | |
| 59 return false; | |
| 60 } | |
| 61 | |
| 62 void TestShellTab::OnNewTabPageReady() { | |
| 63 NOTIMPLEMENTED(); | |
| 64 } | |
| 65 | |
| 66 void TestShellTab::HandlePopupNavigation(chrome::NavigateParams* params) { | |
| 67 NOTIMPLEMENTED(); | |
| 68 } | |
| 69 | |
| 70 bool TestShellTab::RegisterTestShellTab(JNIEnv* env) { | 34 bool TestShellTab::RegisterTestShellTab(JNIEnv* env) { |
| 71 return RegisterNativesImpl(env); | 35 return RegisterNativesImpl(env); |
| 72 } | 36 } |
| 73 | 37 |
| 74 ScopedJavaLocalRef<jstring> TestShellTab::FixupUrl(JNIEnv* env, | 38 ScopedJavaLocalRef<jstring> TestShellTab::FixupUrl(JNIEnv* env, |
|
Yaron
2013/12/06 21:25:52
Can you just delete this whole file. I think we ha
David Trainor- moved to gerrit
2013/12/17 19:53:07
Done.
| |
| 75 jobject obj, | 39 jobject obj, |
| 76 jstring url) { | 40 jstring url) { |
| 77 GURL fixed_url(URLFixerUpper::FixupURL(ConvertJavaStringToUTF8(env, url), | 41 GURL fixed_url(URLFixerUpper::FixupURL(ConvertJavaStringToUTF8(env, url), |
| 78 std::string())); | 42 std::string())); |
| 79 | 43 |
| 80 std::string fixed_spec; | 44 std::string fixed_spec; |
| 81 if (fixed_url.is_valid()) | 45 if (fixed_url.is_valid()) |
| 82 fixed_spec = fixed_url.spec(); | 46 fixed_spec = fixed_url.spec(); |
| 83 | 47 |
| 84 return ConvertUTF8ToJavaString(env, fixed_spec); | 48 return ConvertUTF8ToJavaString(env, fixed_spec); |
| 85 } | 49 } |
| 86 | 50 |
| 87 static jlong Init(JNIEnv* env, jobject obj) { | 51 static jlong Init(JNIEnv* env, jobject obj) { |
| 88 return reinterpret_cast<intptr_t>(new TestShellTab(env, obj)); | 52 return reinterpret_cast<intptr_t>(new TestShellTab(env, obj)); |
| 89 } | 53 } |
| OLD | NEW |