Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/android/tab_android.h

Issue 10803010: Upstream TabAndroid abstract class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@os_compat
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
7
8 #include <jni.h>
9
10 #include "base/android/jni_helper.h"
11 #include "base/android/scoped_java_ref.h"
12 #include "content/public/browser/notification_observer.h"
13 #include "base/string16.h"
14
15 class GURL;
16 class OnContextMenuItemSelectedCallBack;
17 class SkBitmap;
18
19 namespace browser_sync {
20 class SyncedTabDelegate;
21 }
22
23 namespace content {
24 struct ContextMenuParams;
25 class WebContents;
26 }
27
28 class TabAndroid : public content::NotificationObserver {
Yaron 2012/07/19 22:24:56 This doesn't actually implement Observe. Can you m
felipeg 2012/07/20 09:39:09 Done.
29 public:
30 TabAndroid();
31
32 // Convenience method to retrieve the Tab associated with the passed
33 // WebContents. Can return NULL.
34 static TabAndroid* FromWebContents(content::WebContents* web_contents);
35
36 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj);
37
38 virtual browser_sync::SyncedTabDelegate* synced_tab_delegate() = 0;
39
40 int id() const {
41 return tab_id_;
42 }
43
44 // Called to show the regular context menu that is triggered by a long press.
45 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
46
47 // Called to show a custom context menu. Used by the NTP.
48 virtual void ShowCustomContextMenu(
49 const content::ContextMenuParams& params,
50 OnContextMenuItemSelectedCallBack* callback) = 0;
51
52 virtual void ShowSelectFileDialog(
53 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0;
54
55 // --------------------------------------------------------------------------
56 // Public methods that call to Java via JNI
57 // --------------------------------------------------------------------------
58 // Called when context menu option to create the bookmark shortcut on
59 // homescreen is called.
60 virtual void AddShortcutToBookmark(
61 const GURL& url, const string16& title, const SkBitmap& skbitmap,
62 int r_value, int g_value, int b_value) = 0;
63
64 // Called when the mobile promo action asks to send email.
65 virtual void PromoSendEmail(const string16& data_email,
Yaron 2012/07/19 22:24:56 Also, we shouldn't really have this. I think Ted f
felipeg 2012/07/20 09:39:09 Hi Yaron, Ted is not online now, I am adding him t
66 const string16& data_subj,
67 const string16& data_body,
68 const string16& data_inv) = 0;
69
70 protected:
71 virtual ~TabAndroid();
72
73 int tab_id_;
74 };
75
76 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.cc » ('j') | chrome/browser/android/tab_android_stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698