| Index: content/browser/android/selection_popup_controller.h
|
| diff --git a/content/browser/android/selection_popup_controller.h b/content/browser/android/selection_popup_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4f4a4b167226245719b88c69fbbea844093fcd23
|
| --- /dev/null
|
| +++ b/content/browser/android/selection_popup_controller.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_
|
| +#define CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_
|
| +
|
| +#include <jni.h>
|
| +
|
| +#include "base/android/jni_weak_ref.h"
|
| +#include "content/browser/android/render_process_connector.h"
|
| +#include "ui/gfx/geometry/rect_f.h"
|
| +#include "ui/touch_selection/selection_event_type.h"
|
| +
|
| +namespace content {
|
| +
|
| +class RenderWidgetHostViewAndroid;
|
| +
|
| +class SelectionPopupController : public RenderProcessConnector {
|
| + public:
|
| + SelectionPopupController(JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& obj,
|
| + WebContents* web_contents);
|
| + ~SelectionPopupController() override;
|
| +
|
| + // RendetWidgetHostViewBinder implementation.
|
| + void UpdateRenderProcessConnection(
|
| + RenderWidgetHostViewAndroid* old_rwhva,
|
| + RenderWidgetHostViewAndroid* new_rhwva) override;
|
| +
|
| + // Called from native -> java
|
| + void OnSelectionEvent(ui::SelectionEventType event,
|
| + const gfx::PointF& selection_anchor,
|
| + const gfx::RectF& selection_rect);
|
| + void OnSelectionChanged(const std::string& text);
|
| +
|
| + private:
|
| + JavaObjectWeakGlobalRef java_obj_;
|
| +};
|
| +
|
| +bool RegisterSelectionPopupController(JNIEnv* env);
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_
|
|
|