| 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_helper.h" | 10 #include "base/android/jni_helper.h" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 class SkBitmap; | 16 class SkBitmap; |
| 17 | 17 |
| 18 namespace browser_sync { | 18 namespace browser_sync { |
| 19 class SyncedTabDelegate; | 19 class SyncedTabDelegate; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace chrome { |
| 23 namespace android { |
| 24 class ChromeWebContentsDelegateAndroid; |
| 25 } |
| 26 } |
| 27 |
| 22 namespace content { | 28 namespace content { |
| 23 struct ContextMenuParams; | 29 struct ContextMenuParams; |
| 24 class WebContents; | 30 class WebContents; |
| 25 } | 31 } |
| 26 | 32 |
| 27 class TabAndroid { | 33 class TabAndroid { |
| 28 public: | 34 public: |
| 29 TabAndroid(); | 35 TabAndroid(); |
| 30 | 36 |
| 31 // Convenience method to retrieve the Tab associated with the passed | 37 // Convenience method to retrieve the Tab associated with the passed |
| 32 // WebContents. Can return NULL. | 38 // WebContents. Can return NULL. |
| 33 static TabAndroid* FromWebContents(content::WebContents* web_contents); | 39 static TabAndroid* FromWebContents(content::WebContents* web_contents); |
| 34 | 40 |
| 35 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); | 41 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); |
| 36 | 42 |
| 37 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() = 0; | 43 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() = 0; |
| 44 virtual chrome::android::ChromeWebContentsDelegateAndroid* |
| 45 GetChromeWebContentsDelegateAndroid() const = 0; |
| 38 | 46 |
| 39 int id() const { | 47 int id() const { |
| 40 return tab_id_; | 48 return tab_id_; |
| 41 } | 49 } |
| 42 | 50 |
| 43 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, | 51 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, |
| 44 const string16& host, | 52 const string16& host, |
| 45 const string16& realm) = 0; | 53 const string16& realm) = 0; |
| 46 | 54 |
| 47 // Called to show the regular context menu that is triggered by a long press. | 55 // Called to show the regular context menu that is triggered by a long press. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 64 const GURL& url, const string16& title, const SkBitmap& skbitmap, | 72 const GURL& url, const string16& title, const SkBitmap& skbitmap, |
| 65 int r_value, int g_value, int b_value) = 0; | 73 int r_value, int g_value, int b_value) = 0; |
| 66 | 74 |
| 67 protected: | 75 protected: |
| 68 virtual ~TabAndroid(); | 76 virtual ~TabAndroid(); |
| 69 | 77 |
| 70 int tab_id_; | 78 int tab_id_; |
| 71 }; | 79 }; |
| 72 | 80 |
| 73 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 81 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
| OLD | NEW |