Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / android / tab_android.h
index 0f3eb3d..c61baff 100644 (file)
@@ -11,6 +11,7 @@
 #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"
@@ -46,12 +47,16 @@ class PrerenderManager;
 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
@@ -98,10 +103,6 @@ class TabAndroid : public CoreTabHelperDelegate,
 
   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(
@@ -113,19 +114,22 @@ class TabAndroid : public CoreTabHelperDelegate,
   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 -----------------------------------------
 
@@ -150,16 +154,15 @@ class TabAndroid : public CoreTabHelperDelegate,
                                 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.