| 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" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 static TabAndroid* FromWebContents(content::WebContents* web_contents); | 33 static TabAndroid* FromWebContents(content::WebContents* web_contents); |
| 34 | 34 |
| 35 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); | 35 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); |
| 36 | 36 |
| 37 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() = 0; | 37 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() = 0; |
| 38 | 38 |
| 39 int id() const { | 39 int id() const { |
| 40 return tab_id_; | 40 return tab_id_; |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, |
| 44 const string16& host, |
| 45 const string16& realm) = 0; |
| 46 |
| 43 // Called to show the regular context menu that is triggered by a long press. | 47 // Called to show the regular context menu that is triggered by a long press. |
| 44 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; | 48 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; |
| 45 | 49 |
| 46 // Called to show a custom context menu. Used by the NTP. | 50 // Called to show a custom context menu. Used by the NTP. |
| 47 virtual void ShowCustomContextMenu( | 51 virtual void ShowCustomContextMenu( |
| 48 const content::ContextMenuParams& params, | 52 const content::ContextMenuParams& params, |
| 49 OnContextMenuItemSelectedCallBack* callback) = 0; | 53 OnContextMenuItemSelectedCallBack* callback) = 0; |
| 50 | 54 |
| 51 virtual void ShowSelectFileDialog( | 55 virtual void ShowSelectFileDialog( |
| 52 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0; | 56 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0; |
| 53 | 57 |
| 54 // -------------------------------------------------------------------------- | 58 // -------------------------------------------------------------------------- |
| 55 // Public methods that call to Java via JNI | 59 // Public methods that call to Java via JNI |
| 56 // -------------------------------------------------------------------------- | 60 // -------------------------------------------------------------------------- |
| 57 // Called when context menu option to create the bookmark shortcut on | 61 // Called when context menu option to create the bookmark shortcut on |
| 58 // homescreen is called. | 62 // homescreen is called. |
| 59 virtual void AddShortcutToBookmark( | 63 virtual void AddShortcutToBookmark( |
| 60 const GURL& url, const string16& title, const SkBitmap& skbitmap, | 64 const GURL& url, const string16& title, const SkBitmap& skbitmap, |
| 61 int r_value, int g_value, int b_value) = 0; | 65 int r_value, int g_value, int b_value) = 0; |
| 62 | 66 |
| 63 protected: | 67 protected: |
| 64 virtual ~TabAndroid(); | 68 virtual ~TabAndroid(); |
| 65 | 69 |
| 66 int tab_id_; | 70 int tab_id_; |
| 67 }; | 71 }; |
| 68 | 72 |
| 69 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 73 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
| OLD | NEW |