OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ |
6 #define CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ | 6 #define CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const content::ContextMenuParams& params, | 53 const content::ContextMenuParams& params, |
54 const base::Callback<void(int)>& callback) OVERRIDE; | 54 const base::Callback<void(int)>& callback) OVERRIDE; |
55 | 55 |
56 virtual void AddShortcutToBookmark(const GURL& url, | 56 virtual void AddShortcutToBookmark(const GURL& url, |
57 const string16& title, | 57 const string16& title, |
58 const SkBitmap& skbitmap, | 58 const SkBitmap& skbitmap, |
59 int r_value, | 59 int r_value, |
60 int g_value, | 60 int g_value, |
61 int b_value) OVERRIDE; | 61 int b_value) OVERRIDE; |
62 | 62 |
| 63 virtual void RunExternalProtocolDialog(const GURL& url) OVERRIDE; |
| 64 |
63 // Register the Tab's native methods through JNI. | 65 // Register the Tab's native methods through JNI. |
64 static bool RegisterTabBaseAndroidImpl(JNIEnv* env); | 66 static bool RegisterTabBaseAndroidImpl(JNIEnv* env); |
65 | 67 |
66 // -------------------------------------------------------------------------- | 68 // -------------------------------------------------------------------------- |
67 // Methods called from Java via JNI | 69 // Methods called from Java via JNI |
68 // -------------------------------------------------------------------------- | 70 // -------------------------------------------------------------------------- |
69 void InitWebContentsDelegate(JNIEnv* env, | 71 void InitWebContentsDelegate(JNIEnv* env, |
70 jobject obj, | 72 jobject obj, |
71 jobject web_contents_delegate); | 73 jobject web_contents_delegate); |
72 | 74 |
73 base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env, | 75 base::android::ScopedJavaLocalRef<jstring> FixupUrl(JNIEnv* env, |
74 jobject obj, | 76 jobject obj, |
75 jstring url); | 77 jstring url); |
76 | 78 |
77 protected: | 79 protected: |
78 virtual ~TabBaseAndroidImpl(); | 80 virtual ~TabBaseAndroidImpl(); |
79 | 81 |
80 private: | 82 private: |
81 scoped_ptr<content::WebContents> web_contents_; | 83 scoped_ptr<content::WebContents> web_contents_; |
82 scoped_ptr<WebKit::WebLayer> tab_layer_; | 84 scoped_ptr<WebKit::WebLayer> tab_layer_; |
83 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> | 85 scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> |
84 web_contents_delegate_; | 86 web_contents_delegate_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(TabBaseAndroidImpl); | 88 DISALLOW_COPY_AND_ASSIGN(TabBaseAndroidImpl); |
87 }; | 89 }; |
88 | 90 |
89 #endif // CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ | 91 #endif // CHROME_BROWSER_ANDROID_TAB_BASE_ANDROID_IMPL_H_ |
OLD | NEW |