Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Side by Side Diff: chrome/android/testshell/testshell_tab.cc

Issue 108803002: Make TabBase non abstract (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/android/testshell/testshell_tab.h ('k') | chrome/browser/android/tab_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 #include "chrome/android/testshell/testshell_tab.h"
6
7 #include "base/android/jni_string.h"
8 #include "base/logging.h"
9 #include "chrome/browser/android/chrome_web_contents_delegate_android.h"
10 #include "chrome/browser/ui/android/window_android_helper.h"
11 #include "chrome/browser/ui/browser_navigator.h"
12 #include "chrome/common/net/url_fixer_upper.h"
13 #include "content/public/browser/android/content_view_core.h"
14 #include "content/public/browser/web_contents.h"
15 #include "jni/TestShellTab_jni.h"
16 #include "ui/base/android/window_android.h"
17 #include "url/gurl.h"
18
19 using base::android::ConvertJavaStringToUTF8;
20 using base::android::ConvertUTF8ToJavaString;
21 using base::android::ScopedJavaLocalRef;
22 using chrome::android::ChromeWebContentsDelegateAndroid;
23 using content::WebContents;
24 using ui::WindowAndroid;
25
26 TestShellTab::TestShellTab(JNIEnv* env,
27 jobject obj)
28 : TabAndroid(env, obj) {
29 }
30
31 TestShellTab::~TestShellTab() {
32 }
33
34 void TestShellTab::Destroy(JNIEnv* env, jobject obj) {
35 delete this;
36 }
37
38 void TestShellTab::OnReceivedHttpAuthRequest(jobject auth_handler,
39 const base::string16& host,
40 const base::string16& realm) {
41 NOTIMPLEMENTED();
42 }
43
44 void TestShellTab::AddShortcutToBookmark(
45 const GURL& url, const base::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) {
71 return RegisterNativesImpl(env);
72 }
73
74 ScopedJavaLocalRef<jstring> TestShellTab::FixupUrl(JNIEnv* env,
75 jobject obj,
76 jstring url) {
77 GURL fixed_url(URLFixerUpper::FixupURL(ConvertJavaStringToUTF8(env, url),
78 std::string()));
79
80 std::string fixed_spec;
81 if (fixed_url.is_valid())
82 fixed_spec = fixed_url.spec();
83
84 return ConvertUTF8ToJavaString(env, fixed_spec);
85 }
86
87 static jlong Init(JNIEnv* env, jobject obj) {
88 return reinterpret_cast<intptr_t>(new TestShellTab(env, obj));
89 }
OLDNEW
« no previous file with comments | « chrome/android/testshell/testshell_tab.h ('k') | chrome/browser/android/tab_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698