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_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_MANAGER_H_ |
6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_MANAGER_H_ | 6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_MANAGER_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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 jobject delegate, | 83 jobject delegate, |
84 jobject jweb_contents); | 84 jobject jweb_contents); |
85 | 85 |
86 private: | 86 private: |
87 // TODO(donnd): encapsulate these response parameters? | 87 // TODO(donnd): encapsulate these response parameters? |
88 void OnSearchTermResolutionResponse(bool is_invalid, | 88 void OnSearchTermResolutionResponse(bool is_invalid, |
89 int response_code, | 89 int response_code, |
90 const std::string& search_term, | 90 const std::string& search_term, |
91 const std::string& display_text, | 91 const std::string& display_text, |
92 const std::string& alternate_term, | 92 const std::string& alternate_term, |
93 bool prevent_preload); | 93 bool prevent_preload, |
| 94 int selection_start_adjust, |
| 95 int selection_end_adjust); |
94 | 96 |
95 // Calls back to Java with the surrounding text to be displayed. | 97 // Calls back to Java with the surrounding text to be displayed. |
96 void OnSurroundingTextAvailable(const std::string& before_text, | 98 void OnSurroundingTextAvailable(const std::string& before_text, |
97 const std::string& after_text); | 99 const std::string& after_text); |
98 | 100 |
99 // Calls back to Java with notification for Icing selection. | 101 // Calls back to Java with notification for Icing selection. |
100 void OnIcingSelectionAvailable(const std::string& encoding, | 102 void OnIcingSelectionAvailable(const std::string& encoding, |
101 const base::string16& surrounding_text, | 103 const base::string16& surrounding_text, |
102 size_t start_offset, | 104 size_t start_offset, |
103 size_t end_offset); | 105 size_t end_offset); |
(...skipping 11 matching lines...) Expand all Loading... |
115 scoped_ptr<content::WebContents> web_contents_; | 117 scoped_ptr<content::WebContents> web_contents_; |
116 scoped_ptr<web_contents_delegate_android::WebContentsDelegateAndroid> | 118 scoped_ptr<web_contents_delegate_android::WebContentsDelegateAndroid> |
117 web_contents_delegate_; | 119 web_contents_delegate_; |
118 | 120 |
119 DISALLOW_COPY_AND_ASSIGN(ContextualSearchManager); | 121 DISALLOW_COPY_AND_ASSIGN(ContextualSearchManager); |
120 }; | 122 }; |
121 | 123 |
122 bool RegisterContextualSearchManager(JNIEnv* env); | 124 bool RegisterContextualSearchManager(JNIEnv* env); |
123 | 125 |
124 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_MANAGER_H_ | 126 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_MANAGER_H_ |
OLD | NEW |