Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_ANDROID_CONTEXT_MENU_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 void OnCustomItemSelected(JNIEnv* env, jobject obj, jint action); | 34 void OnCustomItemSelected(JNIEnv* env, jobject obj, jint action); |
| 35 void OnStartDownload(JNIEnv* env, jobject obj, jboolean jis_link); | 35 void OnStartDownload(JNIEnv* env, jobject obj, jboolean jis_link); |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 explicit ContextMenuHelper(content::WebContents* web_contents); | 38 explicit ContextMenuHelper(content::WebContents* web_contents); |
| 39 friend class content::WebContentsUserData<ContextMenuHelper>; | 39 friend class content::WebContentsUserData<ContextMenuHelper>; |
| 40 | 40 |
| 41 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams( | 41 static base::android::ScopedJavaLocalRef<jobject> CreateJavaContextMenuParams( |
| 42 const content::ContextMenuParams& params); | 42 const content::ContextMenuParams& params); |
| 43 | 43 |
| 44 // Strips the referring url from username, password and ref fields. | |
|
Ted C
2014/03/05 22:20:53
s/from/of
ppi
2014/03/06 11:41:04
Done.
| |
| 45 static GURL SanitizeReferrer(const GURL& referrer); | |
| 46 | |
| 44 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 47 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
| 45 content::WebContents* web_contents_; | 48 content::WebContents* web_contents_; |
| 46 | 49 |
| 47 base::Callback<void(int)> context_menu_callback_; | 50 base::Callback<void(int)> context_menu_callback_; |
| 48 content::ContextMenuParams context_menu_params_; | 51 content::ContextMenuParams context_menu_params_; |
| 49 | 52 |
| 50 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper); | 53 DISALLOW_COPY_AND_ASSIGN(ContextMenuHelper); |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 bool RegisterContextMenuHelper(JNIEnv* env); | 56 bool RegisterContextMenuHelper(JNIEnv* env); |
| 54 | 57 |
| 55 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ | 58 #endif // CHROME_BROWSER_UI_ANDROID_CONTEXT_MENU_HELPER_H_ |
| OLD | NEW |