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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.cc » ('j') | chrome/browser/android/tab_android_stubs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.h
diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..2052006a07bc1aa52ec8ad495773ccd1a8e1fb46
--- /dev/null
+++ b/chrome/browser/android/tab_android.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
+#define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
+
+#include <jni.h>
+
+#include "base/android/jni_helper.h"
+#include "base/android/scoped_java_ref.h"
+#include "content/public/browser/notification_observer.h"
+#include "base/string16.h"
+
+class GURL;
+class OnContextMenuItemSelectedCallBack;
+class SkBitmap;
+
+namespace browser_sync {
+class SyncedTabDelegate;
+}
+
+namespace content {
+struct ContextMenuParams;
+class WebContents;
+}
+
+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.
+ public:
+ TabAndroid();
+
+ // Convenience method to retrieve the Tab associated with the passed
+ // WebContents. Can return NULL.
+ static TabAndroid* FromWebContents(content::WebContents* web_contents);
+
+ static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj);
+
+ virtual browser_sync::SyncedTabDelegate* synced_tab_delegate() = 0;
+
+ int id() const {
+ return tab_id_;
+ }
+
+ // Called to show the regular context menu that is triggered by a long press.
+ virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
+
+ // Called to show a custom context menu. Used by the NTP.
+ virtual void ShowCustomContextMenu(
+ const content::ContextMenuParams& params,
+ OnContextMenuItemSelectedCallBack* callback) = 0;
+
+ virtual void ShowSelectFileDialog(
+ const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0;
+
+ // --------------------------------------------------------------------------
+ // Public methods that call to Java via JNI
+ // --------------------------------------------------------------------------
+ // Called when context menu option to create the bookmark shortcut on
+ // homescreen is called.
+ virtual void AddShortcutToBookmark(
+ const GURL& url, const string16& title, const SkBitmap& skbitmap,
+ int r_value, int g_value, int b_value) = 0;
+
+ // Called when the mobile promo action asks to send email.
+ 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
+ const string16& data_subj,
+ const string16& data_body,
+ const string16& data_inv) = 0;
+
+ protected:
+ virtual ~TabAndroid();
+
+ int tab_id_;
+};
+
+#endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
« 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