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

Side by Side Diff: chrome/browser/android/bottombar/contextualsearch/contextual_search_panel.h

Issue 1304013002: Move functionality for ContentViewCore to ContextualSearchPanel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple-move-cvc-to-panel
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
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_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_PANE L_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BOTTOMBAR_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_PANE L_H_
6 #define CHROME_BROWSER_ANDROID_BOTTOMBAR_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_PANE L_H_ 6 #define CHROME_BROWSER_ANDROID_BOTTOMBAR_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_PANE L_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 26 matching lines...) Expand all
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 Contextual Search Results. 40 // |ContentViewCore| which holds the Contextual Search Results.
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.
45 void DestroyWebContents(JNIEnv* env, jobject jobj); 45 void DestroyWebContents(JNIEnv* env, jobject jobj);
46 46
47 // Release ownership of WebContents.
48 void ReleaseWebContents(JNIEnv* env, jobject jobj);
49
50 // Sets the delegate used to convert navigations to intents. 47 // Sets the delegate used to convert navigations to intents.
51 void SetInterceptNavigationDelegate(JNIEnv* env, 48 void SetInterceptNavigationDelegate(JNIEnv* env,
52 jobject obj, 49 jobject obj,
53 jobject delegate, 50 jobject delegate,
54 jobject jweb_contents); 51 jobject jweb_contents);
55 52
56 private: 53 private:
57 // Our global reference to the Java ContextualSearchPanel. 54 // Our global reference to the Java ContextualSearchPanel.
58 base::android::ScopedJavaGlobalRef<jobject> java_manager_; 55 base::android::ScopedJavaGlobalRef<jobject> java_manager_;
59 56
60 // Used if we need to clear history. 57 // Used if we need to clear history.
61 base::CancelableTaskTracker history_task_tracker_; 58 base::CancelableTaskTracker history_task_tracker_;
62 59
63 // The WebContents that holds the panel content. 60 // The WebContents that holds the panel content.
64 scoped_ptr<content::WebContents> web_contents_; 61 scoped_ptr<content::WebContents> web_contents_;
65 scoped_ptr<web_contents_delegate_android::WebContentsDelegateAndroid> 62 scoped_ptr<web_contents_delegate_android::WebContentsDelegateAndroid>
66 web_contents_delegate_; 63 web_contents_delegate_;
67 64
68 DISALLOW_COPY_AND_ASSIGN(ContextualSearchPanel); 65 DISALLOW_COPY_AND_ASSIGN(ContextualSearchPanel);
69 }; 66 };
70 67
71 bool RegisterContextualSearchPanel(JNIEnv* env); 68 bool RegisterContextualSearchPanel(JNIEnv* env);
72 69
73 #endif // CHROME_BROWSER_ANDROID_BOTTOMBAR_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_P ANEL_H_ 70 #endif // CHROME_BROWSER_ANDROID_BOTTOMBAR_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_P ANEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698