Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_BASE_ANDROID_IMPL_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "chrome/browser/android/tab_android.h" | |
| 13 | |
| 14 class TabContents; | |
|
Avi (use Gerrit)
2012/09/24 23:43:49
Do you need this any more?
David Trainor- moved to gerrit
2012/09/25 00:34:32
Done.
| |
| 15 | |
| 16 namespace browser_sync { | |
| 17 class SyncedTabDelegate; | |
| 18 } | |
| 19 | |
| 20 namespace chrome { | |
| 21 namespace android { | |
| 22 class ChromeWebContentsDelegateAndroid; | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 namespace content { | |
| 27 class WebContents; | |
| 28 } | |
| 29 | |
| 30 namespace WebKit { | |
| 31 class WebLayer; | |
| 32 } | |
| 33 | |
| 34 class TabBaseAndroidImpl : public TabAndroid { | |
| 35 public: | |
| 36 TabBaseAndroidImpl(JNIEnv* env, | |
| 37 jobject obj, | |
| 38 content::WebContents* web_contents); | |
| 39 void Destroy(JNIEnv* env, jobject obj); | |
| 40 | |
| 41 WebKit::WebLayer* tab_layer() const { return tab_layer_.get(); } | |
| 42 | |
| 43 // -------------------------------------------------------------------------- | |
| 44 // TabAndroid Methods | |
| 45 // -------------------------------------------------------------------------- | |
| 46 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() OVERRIDE; | |
| 47 | |
| 48 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, | |
| 49 const string16& host, | |
| 50 const string16& realm) OVERRIDE; | |
| 51 virtual void ShowContextMenu( | |
| 52 const content::ContextMenuParams& params) OVERRIDE; | |
| 53 | |
| 54 virtual void ShowCustomContextMenu( | |
| 55 const content::ContextMenuParams& params, | |
| 56 const base::Callback<void(int)>& callback) OVERRIDE; | |
| 57 | |
| 58 virtual void ShowSelectFileDialog( | |
| 59 const base::android::ScopedJavaLocalRef<jobject>& select_file) OVERRIDE; | |
| 60 | |
| 61 virtual void AddShortcutToBookmark( | |
| 62 const GURL& url, const string16& title, const SkBitmap& skbitmap, | |
| 63 int r_value, int g_value, int b_value) OVERRIDE; | |
| 64 | |
| 65 // Called when the common ExternalProtocolHandler wants to | |
| 66 // run the external protocol dialog. | |
| 67 virtual void RunExternalProtocolDialog(const GURL& url) OVERRIDE; | |
| 68 | |
| 69 // Register the Tab's native methods through JNI. | |
| 70 static bool RegisterTabBaseAndroidImpl(JNIEnv* env); | |
| 71 | |
| 72 // -------------------------------------------------------------------------- | |
| 73 // Methods called from Java via JNI | |
| 74 // -------------------------------------------------------------------------- | |
| 75 void InitWebContentsDelegate(JNIEnv* env, | |
| 76 jobject obj, | |
| 77 jobject web_contents_delegate); | |
| 78 | |
| 79 base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env, | |
| 80 jobject obj, | |
| 81 jstring url); | |
| 82 | |
| 83 protected: | |
| 84 virtual ~TabBaseAndroidImpl(); | |
| 85 | |
| 86 private: | |
| 87 scoped_ptr<content::WebContents> web_contents_; | |
|
Avi (use Gerrit)
2012/09/24 23:43:49
Yeah!
David Trainor- moved to gerrit
2012/09/25 00:34:32
RAWR I EATZ TABCONTENTZ!
O_
/ >
| |
| 88 scoped_ptr<WebKit::WebLayer> tab_layer_; | |
| 89 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | |
| 90 web_contents_delegate_; | |
| 91 | |
| 92 DISALLOW_COPY_AND_ASSIGN(TabBaseAndroidImpl); | |
| 93 }; | |
| 94 | |
| 95 #endif // CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ | |
| OLD | NEW |