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

Side by Side Diff: content/browser/android/selection_popup_controller.h

Issue 2826303003: Let selection events bypass ContentViewCore (Closed)
Patch Set: call Initialize() Created 3 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_
6 #define CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_
7
8 #include <jni.h>
9
10 #include "base/android/jni_weak_ref.h"
11 #include "content/browser/android/render_widget_host_connector.h"
12 #include "ui/gfx/geometry/rect_f.h"
13 #include "ui/touch_selection/selection_event_type.h"
14
15 namespace content {
16
17 class RenderWidgetHostViewAndroid;
18
19 class SelectionPopupController : public RenderWidgetHostConnector {
20 public:
21 SelectionPopupController(JNIEnv* env,
22 const base::android::JavaParamRef<jobject>& obj,
23 WebContents* web_contents);
24
25 // RendetWidgetHostConnector implementation.
26 void UpdateRenderProcessConnection(
27 RenderWidgetHostViewAndroid* old_rwhva,
28 RenderWidgetHostViewAndroid* new_rhwva) override;
29
30 // Called from native -> java
31 void OnSelectionEvent(ui::SelectionEventType event,
32 const gfx::PointF& selection_anchor,
33 const gfx::RectF& selection_rect);
34 void OnSelectionChanged(const std::string& text);
35
36 private:
37 ~SelectionPopupController() override {}
38 JavaObjectWeakGlobalRef java_obj_;
39 };
40
41 bool RegisterSelectionPopupController(JNIEnv* env);
42
43 } // namespace content
44
45 #endif // CONTENT_BROWSER_ANDROID_SELECTION_POPUP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/android/selection_popup_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698