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

Unified Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2667283007: Refactor Samsung SmartClip implementation. (Closed)
Patch Set: Rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index e904d8fe4bc609dd2664c1a1d572e1cd9f439a23..7a11952a77759ca6a129db6d1930eea96b048560 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -119,6 +119,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
using AXTreeSnapshotCallback =
base::Callback<void(
const ui::AXTreeUpdate&)>;
+ using SmartClipCallback = base::Callback<void(const base::string16& text,
+ const base::string16& html)>;
// An accessibility reset is only allowed to prevent very rare corner cases
// or race conditions where the browser and renderer get out of sync. If
@@ -474,6 +476,11 @@ class CONTENT_EXPORT RenderFrameHostImpl
// renderer process to change the accessibility mode.
void UpdateAccessibilityMode();
+ void RequestSmartClipExtract(SmartClipCallback callback, gfx::Rect rect);
+ void OnSmartClipDataExtracted(int id,
+ base::string16 text,
+ base::string16 html);
+
// Request a one-time snapshot of the accessibility tree without changing
// the accessibility mode.
void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
@@ -1058,6 +1065,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
// accessibility tree snapshot calls created by RequestAXTreeSnapshot.
std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_;
+ std::map<int, SmartClipCallback> smart_clip_callbacks_;
+
// Callback when an event is received, for testing.
base::Callback<void(RenderFrameHostImpl*, ui::AXEvent, int)>
accessibility_testing_callback_;

Powered by Google App Engine
This is Rietveld 408576698