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

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
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/string16.h"
13
14 class GURL;
15 class OnContextMenuItemSelectedCallBack;
16 class SkBitmap;
17
18 namespace browser_sync {
19 class SyncedTabDelegate;
20 }
21
22 namespace content {
23 struct ContextMenuParams;
24 class WebContents;
25 }
26
27 class TabAndroid {
28 public:
29 TabAndroid();
30
31 // Convenience method to retrieve the Tab associated with the passed
32 // WebContents. Can return NULL.
33 static TabAndroid* FromWebContents(content::WebContents* web_contents);
34
35 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj);
36
37 virtual browser_sync::SyncedTabDelegate* synced_tab_delegate() = 0;
Yaron 2012/07/20 16:49:28 virtual shouldn't use hacker_style. Rename GetSync
felipeg 2012/07/23 12:20:00 Done.
38
39 int id() const {
40 return tab_id_;
41 }
42
43 // Called to show the regular context menu that is triggered by a long press.
44 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
45
46 // Called to show a custom context menu. Used by the NTP.
47 virtual void ShowCustomContextMenu(
48 const content::ContextMenuParams& params,
49 OnContextMenuItemSelectedCallBack* callback) = 0;
50
51 virtual void ShowSelectFileDialog(
52 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0;
53
54 // --------------------------------------------------------------------------
55 // Public methods that call to Java via JNI
56 // --------------------------------------------------------------------------
57 // Called when context menu option to create the bookmark shortcut on
58 // homescreen is called.
59 virtual void AddShortcutToBookmark(
60 const GURL& url, const string16& title, const SkBitmap& skbitmap,
61 int r_value, int g_value, int b_value) = 0;
62
63 // TODO(felipeg,tedchoc): Remove this when possible.
64 // http://crbug.com/138216
65 // Called when the mobile promo action asks to send email.
66 virtual void PromoSendEmail(const string16& data_email,
67 const string16& data_subj,
68 const string16& data_body,
69 const string16& data_inv) = 0;
70
71 protected:
72 virtual ~TabAndroid();
73
74 int tab_id_;
75 };
76
77 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698