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 #ifndef CHROME_ANDROID_TESTSHELL_TESTSHELL_TAB_H_ | 5 #ifndef CHROME_ANDROID_TESTSHELL_TESTSHELL_TAB_H_ |
6 #define CHROME_ANDROID_TESTSHELL_TESTSHELL_TAB_H_ | 6 #define CHROME_ANDROID_TESTSHELL_TESTSHELL_TAB_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 int g_value, | 61 int g_value, |
62 int b_value) OVERRIDE; | 62 int b_value) OVERRIDE; |
63 virtual void EditBookmark(int64 node_id, bool is_folder) OVERRIDE; | 63 virtual void EditBookmark(int64 node_id, bool is_folder) OVERRIDE; |
64 | 64 |
65 virtual void ShowSyncSettings() OVERRIDE; | 65 virtual void ShowSyncSettings() OVERRIDE; |
66 virtual void ShowTermsOfService() OVERRIDE; | 66 virtual void ShowTermsOfService() OVERRIDE; |
67 virtual bool ShouldWelcomePageLinkToTermsOfService() OVERRIDE; | 67 virtual bool ShouldWelcomePageLinkToTermsOfService() OVERRIDE; |
68 | 68 |
69 virtual void RunExternalProtocolDialog(const GURL& url) OVERRIDE; | 69 virtual void RunExternalProtocolDialog(const GURL& url) OVERRIDE; |
70 | 70 |
| 71 virtual int64 GetSyncId() const OVERRIDE; |
| 72 virtual void SetSyncId(int64 sync_id) OVERRIDE; |
| 73 |
71 // Register the Tab's native methods through JNI. | 74 // Register the Tab's native methods through JNI. |
72 static bool RegisterTestShellTab(JNIEnv* env); | 75 static bool RegisterTestShellTab(JNIEnv* env); |
73 | 76 |
74 // -------------------------------------------------------------------------- | 77 // -------------------------------------------------------------------------- |
75 // Methods called from Java via JNI | 78 // Methods called from Java via JNI |
76 // -------------------------------------------------------------------------- | 79 // -------------------------------------------------------------------------- |
77 void InitWebContentsDelegate(JNIEnv* env, | 80 void InitWebContentsDelegate(JNIEnv* env, |
78 jobject obj, | 81 jobject obj, |
79 jobject web_contents_delegate); | 82 jobject web_contents_delegate); |
80 | 83 |
81 base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env, | 84 base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env, |
82 jobject obj, | 85 jobject obj, |
83 jstring url); | 86 jstring url); |
84 | 87 |
85 protected: | 88 protected: |
86 virtual ~TestShellTab(); | 89 virtual ~TestShellTab(); |
87 | 90 |
88 private: | 91 private: |
89 scoped_ptr<content::WebContents> web_contents_; | 92 scoped_ptr<content::WebContents> web_contents_; |
90 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | 93 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> |
91 web_contents_delegate_; | 94 web_contents_delegate_; |
92 | 95 |
93 DISALLOW_COPY_AND_ASSIGN(TestShellTab); | 96 DISALLOW_COPY_AND_ASSIGN(TestShellTab); |
94 }; | 97 }; |
95 | 98 |
96 #endif // CHROME_ANDROID_TESTSHELL_TESTSHELL_TAB_H_ | 99 #endif // CHROME_ANDROID_TESTSHELL_TESTSHELL_TAB_H_ |
OLD | NEW |