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

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

Issue 488093003: Have TabAndroid object implement the SearchTabHelperDelegate to provide the necessary functionality… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nit Created 6 years, 4 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
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"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h" 14 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
15 #include "chrome/browser/ui/search/search_tab_helper_delegate.h"
15 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" 16 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
16 #include "chrome/browser/ui/toolbar/toolbar_model.h" 17 #include "chrome/browser/ui/toolbar/toolbar_model.h"
17 #include "components/sessions/session_id.h" 18 #include "components/sessions/session_id.h"
18 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
20 21
21 class GURL; 22 class GURL;
22 class Profile; 23 class Profile;
23 class SkBitmap; 24 class SkBitmap;
24 25
(...skipping 10 matching lines...) Expand all
35 namespace content { 36 namespace content {
36 class ContentViewCore; 37 class ContentViewCore;
37 class WebContents; 38 class WebContents;
38 } 39 }
39 40
40 namespace prerender { 41 namespace prerender {
41 class PrerenderManager; 42 class PrerenderManager;
42 } 43 }
43 44
44 class TabAndroid : public CoreTabHelperDelegate, 45 class TabAndroid : public CoreTabHelperDelegate,
46 public SearchTabHelperDelegate,
45 public content::NotificationObserver { 47 public content::NotificationObserver {
46 public: 48 public:
47 enum TabLoadStatus { 49 enum TabLoadStatus {
48 #define DEFINE_TAB_LOAD_STATUS(name, value) name = value, 50 #define DEFINE_TAB_LOAD_STATUS(name, value) name = value,
49 #include "chrome/browser/android/tab_load_status.h" 51 #include "chrome/browser/android/tab_load_status.h"
50 #undef DEFINE_TAB_LOAD_STATUS 52 #undef DEFINE_TAB_LOAD_STATUS
51 }; 53 };
52 54
53 // Convenience method to retrieve the Tab associated with the passed 55 // Convenience method to retrieve the Tab associated with the passed
54 // WebContents. Can return NULL. 56 // WebContents. Can return NULL.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 chrome::NavigateParams* params, 106 chrome::NavigateParams* params,
105 content::NavigationController::LoadURLParams* load_url_params); 107 content::NavigationController::LoadURLParams* load_url_params);
106 108
107 // CoreTabHelperDelegate ---------------------------------------------------- 109 // CoreTabHelperDelegate ----------------------------------------------------
108 110
109 virtual void SwapTabContents(content::WebContents* old_contents, 111 virtual void SwapTabContents(content::WebContents* old_contents,
110 content::WebContents* new_contents, 112 content::WebContents* new_contents,
111 bool did_start_load, 113 bool did_start_load,
112 bool did_finish_load) OVERRIDE; 114 bool did_finish_load) OVERRIDE;
113 115
116 // Overridden from SearchTabHelperDelegate:
117 virtual void OnWebContentsInstantSupportDisabled(
118 const content::WebContents* web_contents) OVERRIDE;
119
114 // NotificationObserver ----------------------------------------------------- 120 // NotificationObserver -----------------------------------------------------
115 virtual void Observe(int type, 121 virtual void Observe(int type,
116 const content::NotificationSource& source, 122 const content::NotificationSource& source,
117 const content::NotificationDetails& details) OVERRIDE; 123 const content::NotificationDetails& details) OVERRIDE;
118 124
119 // Methods called from Java via JNI ----------------------------------------- 125 // Methods called from Java via JNI -----------------------------------------
120 126
121 virtual void Destroy(JNIEnv* env, jobject obj); 127 virtual void Destroy(JNIEnv* env, jobject obj);
122 virtual void InitWebContents(JNIEnv* env, 128 virtual void InitWebContents(JNIEnv* env,
123 jobject obj, 129 jobject obj,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 scoped_ptr<content::WebContents> web_contents_; 177 scoped_ptr<content::WebContents> web_contents_;
172 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> 178 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid>
173 web_contents_delegate_; 179 web_contents_delegate_;
174 180
175 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_; 181 scoped_ptr<browser_sync::SyncedTabDelegateAndroid> synced_tab_delegate_;
176 182
177 DISALLOW_COPY_AND_ASSIGN(TabAndroid); 183 DISALLOW_COPY_AND_ASSIGN(TabAndroid);
178 }; 184 };
179 185
180 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 186 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/Tab.java ('k') | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698