| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_ | 6 #define CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const base::android::JavaParamRef<jobject>& obj, | 22 const base::android::JavaParamRef<jobject>& obj, |
| 23 WebContents* web_contents); | 23 WebContents* web_contents); |
| 24 | 24 |
| 25 // RendetWidgetHostConnector implementation. | 25 // RendetWidgetHostConnector implementation. |
| 26 void UpdateRenderProcessConnection( | 26 void UpdateRenderProcessConnection( |
| 27 RenderWidgetHostViewAndroid* old_rwhva, | 27 RenderWidgetHostViewAndroid* old_rwhva, |
| 28 RenderWidgetHostViewAndroid* new_rhwva) override; | 28 RenderWidgetHostViewAndroid* new_rhwva) override; |
| 29 | 29 |
| 30 // Called from native -> java | 30 // Called from native -> java |
| 31 void OnSelectionEvent(ui::SelectionEventType event, | 31 void OnSelectionEvent(ui::SelectionEventType event, |
| 32 const gfx::PointF& selection_anchor, | |
| 33 const gfx::RectF& selection_rect); | 32 const gfx::RectF& selection_rect); |
| 34 void OnSelectionChanged(const std::string& text); | 33 void OnSelectionChanged(const std::string& text); |
| 35 | 34 |
| 36 private: | 35 private: |
| 37 ~SelectionPopupController() override {} | 36 ~SelectionPopupController() override {} |
| 38 JavaObjectWeakGlobalRef java_obj_; | 37 JavaObjectWeakGlobalRef java_obj_; |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 bool RegisterSelectionPopupController(JNIEnv* env); | 40 bool RegisterSelectionPopupController(JNIEnv* env); |
| 42 | 41 |
| 43 } // namespace content | 42 } // namespace content |
| 44 | 43 |
| 45 #endif // CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_ | 44 #endif // CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_ |
| OLD | NEW |