| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BOTTOMBAR_OVERLAY_PANEL_CONTENT_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BOTTOMBAR_OVERLAY_PANEL_CONTENT_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BOTTOMBAR_OVERLAY_PANEL_CONTENT_H_ | 6 #define CHROME_BROWSER_ANDROID_BOTTOMBAR_OVERLAY_PANEL_CONTENT_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/task/cancelable_task_tracker.h" | 9 #include "base/task/cancelable_task_tracker.h" |
| 10 #include "chrome/browser/android/contextualsearch/contextual_search_context.h" | 10 #include "chrome/browser/android/contextualsearch/contextual_search_context.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 void RemoveLastHistoryEntry(JNIEnv* env, | 34 void RemoveLastHistoryEntry(JNIEnv* env, |
| 35 jobject obj, | 35 jobject obj, |
| 36 jstring search_url, | 36 jstring search_url, |
| 37 jlong search_start_time_ms); | 37 jlong search_start_time_ms); |
| 38 | 38 |
| 39 // Takes ownership of the WebContents associated with the given | 39 // Takes ownership of the WebContents associated with the given |
| 40 // |ContentViewCore| which holds the panel content. | 40 // |ContentViewCore| which holds the panel content. |
| 41 void SetWebContents(JNIEnv* env, jobject obj, jobject jcontent_view_core, | 41 void SetWebContents(JNIEnv* env, jobject obj, jobject jcontent_view_core, |
| 42 jobject jweb_contents_delegate); | 42 jobject jweb_contents_delegate); |
| 43 | 43 |
| 44 // Destroys the WebContents. | 44 // Destroys the WebContents and returns the destroyed render process host ID. |
| 45 void DestroyWebContents(JNIEnv* env, jobject jobj); | 45 int DestroyWebContents(JNIEnv* env, jobject jobj); |
| 46 | 46 |
| 47 // Sets the delegate used to convert navigations to intents. | 47 // Sets the delegate used to convert navigations to intents. |
| 48 void SetInterceptNavigationDelegate(JNIEnv* env, | 48 void SetInterceptNavigationDelegate(JNIEnv* env, |
| 49 jobject obj, | 49 jobject obj, |
| 50 jobject delegate, | 50 jobject delegate, |
| 51 jobject jweb_contents); | 51 jobject jweb_contents); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 // Our global reference to the Java OverlayPanelContent. | 54 // Our global reference to the Java OverlayPanelContent. |
| 55 base::android::ScopedJavaGlobalRef<jobject> java_manager_; | 55 base::android::ScopedJavaGlobalRef<jobject> java_manager_; |
| 56 | 56 |
| 57 // Used if we need to clear history. | 57 // Used if we need to clear history. |
| 58 base::CancelableTaskTracker history_task_tracker_; | 58 base::CancelableTaskTracker history_task_tracker_; |
| 59 | 59 |
| 60 // The WebContents that holds the panel content. | 60 // The WebContents that holds the panel content. |
| 61 scoped_ptr<content::WebContents> web_contents_; | 61 scoped_ptr<content::WebContents> web_contents_; |
| 62 scoped_ptr<web_contents_delegate_android::WebContentsDelegateAndroid> | 62 scoped_ptr<web_contents_delegate_android::WebContentsDelegateAndroid> |
| 63 web_contents_delegate_; | 63 web_contents_delegate_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(OverlayPanelContent); | 65 DISALLOW_COPY_AND_ASSIGN(OverlayPanelContent); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 bool RegisterOverlayPanelContent(JNIEnv* env); | 68 bool RegisterOverlayPanelContent(JNIEnv* env); |
| 69 | 69 |
| 70 #endif // CHROME_BROWSER_ANDROID_BOTTOMBAR_OVERLAY_PANEL_CONTENT_H_ | 70 #endif // CHROME_BROWSER_ANDROID_BOTTOMBAR_OVERLAY_PANEL_CONTENT_H_ |
| OLD | NEW |