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

Side by Side Diff: chrome/browser/android/tab_android.h

Issue 1442433003: Add "Show saved copy" button in dino page when there's offline copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some minor fixes Created 5 years, 1 month 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
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 void HandlePopupNavigation(chrome::NavigateParams* params); 121 void HandlePopupNavigation(chrome::NavigateParams* params);
122 122
123 bool HasPrerenderedUrl(GURL gurl); 123 bool HasPrerenderedUrl(GURL gurl);
124 124
125 void MakeLoadURLParams( 125 void MakeLoadURLParams(
126 chrome::NavigateParams* params, 126 chrome::NavigateParams* params,
127 content::NavigationController::LoadURLParams* load_url_params); 127 content::NavigationController::LoadURLParams* load_url_params);
128 128
129 bool HasOfflinePages() const; 129 bool HasOfflinePages() const;
130 bool HasOfflineCopyForCurrentPage() const;
130 void ShowOfflinePages(); 131 void ShowOfflinePages();
132 void LoadOfflineCopy(const GURL& url);
131 133
132 // Overridden from CoreTabHelperDelegate: 134 // Overridden from CoreTabHelperDelegate:
133 void SwapTabContents(content::WebContents* old_contents, 135 void SwapTabContents(content::WebContents* old_contents,
134 content::WebContents* new_contents, 136 content::WebContents* new_contents,
135 bool did_start_load, 137 bool did_start_load,
136 bool did_finish_load) override; 138 bool did_finish_load) override;
137 139
138 // Overridden from InstantServiceObserver: 140 // Overridden from InstantServiceObserver:
139 void DefaultSearchProviderChanged( 141 void DefaultSearchProviderChanged(
140 bool google_base_url_domain_changed) override; 142 bool google_base_url_domain_changed) override;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 jobject jcontent_view_core); 235 jobject jcontent_view_core);
234 236
235 bool HasPrerenderedUrl(JNIEnv* env, jobject obj, jstring url); 237 bool HasPrerenderedUrl(JNIEnv* env, jobject obj, jstring url);
236 238
237 // Register the Tab's native methods through JNI. 239 // Register the Tab's native methods through JNI.
238 static bool RegisterTabAndroid(JNIEnv* env); 240 static bool RegisterTabAndroid(JNIEnv* env);
239 241
240 private: 242 private:
241 prerender::PrerenderManager* GetPrerenderManager() const; 243 prerender::PrerenderManager* GetPrerenderManager() const;
242 244
245 int64_t GetBookmarkIdHelper(bool only_editable) const;
246
243 const offline_pages::OfflinePageItem* GetOfflinePage(const GURL& url) const; 247 const offline_pages::OfflinePageItem* GetOfflinePage(const GURL& url) const;
244 248
245 JavaObjectWeakGlobalRef weak_java_tab_; 249 JavaObjectWeakGlobalRef weak_java_tab_;
246 250
247 // The identifier used by session restore for this tab. 251 // The identifier used by session restore for this tab.
248 SessionID session_tab_id_; 252 SessionID session_tab_id_;
249 253
250 // Identifier of the window the tab is in. 254 // Identifier of the window the tab is in.
251 SessionID session_window_id_; 255 SessionID session_window_id_;
252 256
253 content::NotificationRegistrar notification_registrar_; 257 content::NotificationRegistrar notification_registrar_;
254 258
255 scoped_refptr<cc::Layer> content_layer_; 259 scoped_refptr<cc::Layer> content_layer_;
256 chrome::android::TabContentManager* tab_content_manager_; 260 chrome::android::TabContentManager* tab_content_manager_;
257 261
258 scoped_ptr<content::WebContents> web_contents_; 262 scoped_ptr<content::WebContents> web_contents_;
259 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid> 263 scoped_ptr<chrome::android::TabWebContentsDelegateAndroid>
260 web_contents_delegate_; 264 web_contents_delegate_;
261 265
262 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; 266 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_;
263 267
264 DISALLOW_COPY_AND_ASSIGN(TabAndroid); 268 DISALLOW_COPY_AND_ASSIGN(TabAndroid);
265 }; 269 };
266 270
267 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 271 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698