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

Unified Diff: chrome/browser/android/tab_base_android_impl.h

Issue 10968003: Add rendering support to the TestShell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: chrome/browser/android/tab_base_android_impl.h
diff --git a/chrome/browser/android/tab_base_android_impl.h b/chrome/browser/android/tab_base_android_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..0c7af7594cedd4cb83cbf3750a856567e0ec5039
--- /dev/null
+++ b/chrome/browser/android/tab_base_android_impl.h
@@ -0,0 +1,89 @@
+// 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_BASE_ANDROID_IMPL_H_
+#define CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_
+
+#include <jni.h>
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/android/tab_android.h"
+
+class TabContents;
+
+namespace browser_sync {
+class SyncedTabDelegate;
+} // namespace browser_sync
+
+namespace chrome {
+namespace android {
+class ChromeWebContentsDelegateAndroid;
+} // namespace android
+} // namespace chrome
+
+namespace WebKit {
+class WebLayer;
+} // namespace WebKit
+
+class TabBaseAndroidImpl : public TabAndroid {
+ public:
+ TabBaseAndroidImpl(JNIEnv* env, jobject obj);
+ void Destroy(JNIEnv* env, jobject obj);
+
+ WebKit::WebLayer* tab_layer() { return tab_layer_.get(); }
+
+ // --------------------------------------------------------------------------
+ // TabAndroid Methods
+ // --------------------------------------------------------------------------
+ virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() OVERRIDE;
+
+ virtual void OnReceivedHttpAuthRequest(jobject auth_handler,
+ const string16& host,
Ted C 2012/09/20 17:23:59 indent off
David Trainor- moved to gerrit 2012/09/21 22:59:10 Done.
+ const string16& realm) OVERRIDE;
+ virtual void ShowContextMenu(
+ const content::ContextMenuParams& params) OVERRIDE;
+
+ virtual void ShowCustomContextMenu(
+ const content::ContextMenuParams& params,
+ const base::Callback<void(int)>& callback) OVERRIDE;
+
+ virtual void ShowSelectFileDialog(
+ const base::android::ScopedJavaLocalRef<jobject>& select_file) OVERRIDE;
+
+ virtual void AddShortcutToBookmark(
+ const GURL& url, const string16& title, const SkBitmap& skbitmap,
+ int r_value, int g_value, int b_value) OVERRIDE;
+
+ // Called when the common ExternalProtocolHandler wants to
+ // run the external protocol dialog.
+ virtual void RunExternalProtocolDialog(const GURL& url) OVERRIDE;
+
+ // register the Tab's native methods through jni
+ static bool RegisterTabBaseAndroidImpl(JNIEnv* env);
+
+ // --------------------------------------------------------------------------
+ // Methods called from Java via JNI
+ // --------------------------------------------------------------------------
+ void InitTabContents(JNIEnv* env, jobject obj, jobject view,
+ jobject web_contents_delegate);
+ void DestroyTabContents(JNIEnv* env, jobject obj);
+
+ base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env,
+ jobject obj,
+ jstring url);
+
+ protected:
+ virtual ~TabBaseAndroidImpl();
+
+ private:
+ scoped_ptr<TabContents> tab_contents_;
+ scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid>
+ web_contents_delegate_;
+ scoped_ptr<WebKit::WebLayer> tab_layer_;
+
+ DISALLOW_COPY_AND_ASSIGN(TabBaseAndroidImpl);
+};
+
+#endif // CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698