#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
+#include "chrome/browser/favicon/favicon_tab_helper_observer.h"
#include "chrome/browser/search/instant_service_observer.h"
#include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
#include "chrome/browser/ui/search/search_tab_helper_delegate.h"
class TabAndroid : public CoreTabHelperDelegate,
public InstantServiceObserver,
public SearchTabHelperDelegate,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public FaviconTabHelperObserver {
public:
+ // A Java counterpart will be generated for this enum.
+ // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
enum TabLoadStatus {
-#define DEFINE_TAB_LOAD_STATUS(name, value) name = value,
-#include "chrome/browser/android/tab_load_status.h"
-#undef DEFINE_TAB_LOAD_STATUS
+ PAGE_LOAD_FAILED = 0,
+ DEFAULT_PAGE_LOAD = 1,
+ PARTIAL_PRERENDERED_PAGE_LOAD = 2,
+ FULL_PRERENDERED_PAGE_LOAD = 3,
};
// Convenience method to retrieve the Tab associated with the passed
virtual void HandlePopupNavigation(chrome::NavigateParams* params);
- // Called to determine if chrome://welcome should contain links to the terms
- // of service and the privacy notice.
- virtual bool ShouldWelcomePageLinkToTermsOfService();
-
bool HasPrerenderedUrl(GURL gurl);
void MakeLoadURLParams(
virtual void SwapTabContents(content::WebContents* old_contents,
content::WebContents* new_contents,
bool did_start_load,
- bool did_finish_load) OVERRIDE;
+ bool did_finish_load) override;
// Overridden from InstantServiceObserver:
- void DefaultSearchProviderChanged() OVERRIDE;
+ void DefaultSearchProviderChanged() override;
// Overridden from SearchTabHelperDelegate:
virtual void OnWebContentsInstantSupportDisabled(
- const content::WebContents* web_contents) OVERRIDE;
+ const content::WebContents* web_contents) override;
// NotificationObserver -----------------------------------------------------
virtual void Observe(int type,
const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ const content::NotificationDetails& details) override;
+
+ // FaviconTabHelperObserver -----------------------------------------------
+ virtual void OnFaviconAvailable(const gfx::Image& image) override;
// Methods called from Java via JNI -----------------------------------------
jstring j_referrer_url,
jint referrer_policy,
jboolean is_renderer_initiated);
- ToolbarModel::SecurityLevel GetSecurityLevel(JNIEnv* env, jobject obj);
void SetActiveNavigationEntryTitleForUrl(JNIEnv* env,
jobject obj,
jstring jurl,
jstring jtitle);
bool Print(JNIEnv* env, jobject obj);
- // Called to get favicon of current tab, return null if no favicon is
- // avaliable for current tab.
- base::android::ScopedJavaLocalRef<jobject> GetFavicon(JNIEnv* env,
- jobject obj);
+ // Called to get default favicon of current tab, return null if no
+ // favicon is avaliable for current tab.
+ base::android::ScopedJavaLocalRef<jobject> GetDefaultFavicon(JNIEnv* env,
+ jobject obj);
jboolean IsFaviconValid(JNIEnv* env, jobject jobj);
// Register the Tab's native methods through JNI.