Chromium Code Reviews| 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/string16.h" | 13 #include "base/string16.h" |
| 13 | 14 |
| 15 class ContextMenuHandler; | |
|
Evan Stade
2012/08/23 21:31:48
used?
Ted C
2012/08/23 21:51:58
D'oh...nope
| |
| 14 class GURL; | 16 class GURL; |
| 15 class OnContextMenuItemSelectedCallBack; | |
| 16 class SkBitmap; | 17 class SkBitmap; |
| 17 | 18 |
| 18 namespace browser_sync { | 19 namespace browser_sync { |
| 19 class SyncedTabDelegate; | 20 class SyncedTabDelegate; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 struct ContextMenuParams; | 24 struct ContextMenuParams; |
| 24 class WebContents; | 25 class WebContents; |
| 25 } | 26 } |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 43 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, | 44 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, |
| 44 const string16& host, | 45 const string16& host, |
| 45 const string16& realm) = 0; | 46 const string16& realm) = 0; |
| 46 | 47 |
| 47 // Called to show the regular context menu that is triggered by a long press. | 48 // Called to show the regular context menu that is triggered by a long press. |
| 48 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; | 49 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; |
| 49 | 50 |
| 50 // Called to show a custom context menu. Used by the NTP. | 51 // Called to show a custom context menu. Used by the NTP. |
| 51 virtual void ShowCustomContextMenu( | 52 virtual void ShowCustomContextMenu( |
| 52 const content::ContextMenuParams& params, | 53 const content::ContextMenuParams& params, |
| 53 OnContextMenuItemSelectedCallBack* callback) = 0; | 54 const base::Callback<void(int)>& callback) = 0; |
| 54 | 55 |
| 55 virtual void ShowSelectFileDialog( | 56 virtual void ShowSelectFileDialog( |
| 56 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0; | 57 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0; |
| 57 | 58 |
| 58 // -------------------------------------------------------------------------- | 59 // -------------------------------------------------------------------------- |
| 59 // Public methods that call to Java via JNI | 60 // Public methods that call to Java via JNI |
| 60 // -------------------------------------------------------------------------- | 61 // -------------------------------------------------------------------------- |
| 61 // Called when context menu option to create the bookmark shortcut on | 62 // Called when context menu option to create the bookmark shortcut on |
| 62 // homescreen is called. | 63 // homescreen is called. |
| 63 virtual void AddShortcutToBookmark( | 64 virtual void AddShortcutToBookmark( |
| 64 const GURL& url, const string16& title, const SkBitmap& skbitmap, | 65 const GURL& url, const string16& title, const SkBitmap& skbitmap, |
| 65 int r_value, int g_value, int b_value) = 0; | 66 int r_value, int g_value, int b_value) = 0; |
| 66 | 67 |
| 67 protected: | 68 protected: |
| 68 virtual ~TabAndroid(); | 69 virtual ~TabAndroid(); |
| 69 | 70 |
| 70 int tab_id_; | 71 int tab_id_; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ | 74 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ |
| OLD | NEW |