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_BROWSER_ANDROID_TAB_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Helper methods to make it easier to access objects from the associated | 103 // Helper methods to make it easier to access objects from the associated |
104 // WebContents. Can return NULL. | 104 // WebContents. Can return NULL. |
105 content::ContentViewCore* GetContentViewCore() const; | 105 content::ContentViewCore* GetContentViewCore() const; |
106 Profile* GetProfile() const; | 106 Profile* GetProfile() const; |
107 browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() const; | 107 browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() const; |
108 | 108 |
109 void SetWindowSessionID(SessionID::id_type window_id); | 109 void SetWindowSessionID(SessionID::id_type window_id); |
110 void SetSyncId(int sync_id); | 110 void SetSyncId(int sync_id); |
111 | 111 |
112 virtual void HandlePopupNavigation(chrome::NavigateParams* params); | 112 void HandlePopupNavigation(chrome::NavigateParams* params); |
113 | 113 |
114 bool HasPrerenderedUrl(GURL gurl); | 114 bool HasPrerenderedUrl(GURL gurl); |
115 | 115 |
116 void MakeLoadURLParams( | 116 void MakeLoadURLParams( |
117 chrome::NavigateParams* params, | 117 chrome::NavigateParams* params, |
118 content::NavigationController::LoadURLParams* load_url_params); | 118 content::NavigationController::LoadURLParams* load_url_params); |
119 | 119 |
120 // CoreTabHelperDelegate ---------------------------------------------------- | 120 // CoreTabHelperDelegate ---------------------------------------------------- |
121 | 121 |
122 void SwapTabContents(content::WebContents* old_contents, | 122 void SwapTabContents(content::WebContents* old_contents, |
(...skipping 12 matching lines...) Expand all Loading... |
135 // NotificationObserver ----------------------------------------------------- | 135 // NotificationObserver ----------------------------------------------------- |
136 void Observe(int type, | 136 void Observe(int type, |
137 const content::NotificationSource& source, | 137 const content::NotificationSource& source, |
138 const content::NotificationDetails& details) override; | 138 const content::NotificationDetails& details) override; |
139 | 139 |
140 // FaviconTabHelperObserver ----------------------------------------------- | 140 // FaviconTabHelperObserver ----------------------------------------------- |
141 void OnFaviconAvailable(const gfx::Image& image) override; | 141 void OnFaviconAvailable(const gfx::Image& image) override; |
142 | 142 |
143 // Methods called from Java via JNI ----------------------------------------- | 143 // Methods called from Java via JNI ----------------------------------------- |
144 | 144 |
145 virtual void Destroy(JNIEnv* env, jobject obj); | 145 void Destroy(JNIEnv* env, jobject obj); |
146 virtual void InitWebContents(JNIEnv* env, | 146 void InitWebContents(JNIEnv* env, |
147 jobject obj, | 147 jobject obj, |
148 jboolean incognito, | 148 jboolean incognito, |
149 jobject jcontent_view_core, | 149 jobject jcontent_view_core, |
150 jobject jweb_contents_delegate, | 150 jobject jweb_contents_delegate, |
151 jobject jcontext_menu_populator); | 151 jobject jcontext_menu_populator); |
152 virtual void DestroyWebContents(JNIEnv* env, | 152 void DestroyWebContents(JNIEnv* env, jobject obj, jboolean delete_native); |
153 jobject obj, | |
154 jboolean delete_native); | |
155 base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env, | 153 base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env, |
156 jobject obj); | 154 jobject obj); |
157 virtual TabLoadStatus LoadUrl(JNIEnv* env, | 155 TabLoadStatus LoadUrl(JNIEnv* env, |
158 jobject obj, | 156 jobject obj, |
159 jstring url, | 157 jstring url, |
160 jstring j_extra_headers, | 158 jstring j_extra_headers, |
161 jbyteArray j_post_data, | 159 jbyteArray j_post_data, |
162 jint page_transition, | 160 jint page_transition, |
163 jstring j_referrer_url, | 161 jstring j_referrer_url, |
164 jint referrer_policy, | 162 jint referrer_policy, |
165 jboolean is_renderer_initiated, | 163 jboolean is_renderer_initiated, |
166 jlong intent_received_timestamp); | 164 jlong intent_received_timestamp); |
167 void SetActiveNavigationEntryTitleForUrl(JNIEnv* env, | 165 void SetActiveNavigationEntryTitleForUrl(JNIEnv* env, |
168 jobject obj, | 166 jobject obj, |
169 jstring jurl, | 167 jstring jurl, |
170 jstring jtitle); | 168 jstring jtitle); |
171 bool Print(JNIEnv* env, jobject obj); | 169 bool Print(JNIEnv* env, jobject obj); |
172 | 170 |
173 // Sets the tab as content to be printed through JNI. | 171 // Sets the tab as content to be printed through JNI. |
174 void SetPendingPrint(); | 172 void SetPendingPrint(); |
175 | 173 |
176 // Called to get default favicon of current tab, return null if no | 174 // Called to get default favicon of current tab, return null if no |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 scoped_ptr<content::WebContents> web_contents_; | 233 scoped_ptr<content::WebContents> web_contents_; |
236 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | 234 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> |
237 web_contents_delegate_; | 235 web_contents_delegate_; |
238 | 236 |
239 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; | 237 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; |
240 | 238 |
241 DISALLOW_COPY_AND_ASSIGN(TabAndroid); | 239 DISALLOW_COPY_AND_ASSIGN(TabAndroid); |
242 }; | 240 }; |
243 | 241 |
244 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 242 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
OLD | NEW |