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

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

Issue 2667283007: Refactor Samsung SmartClip implementation. (Closed)
Patch Set: Move FrameMsg 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 5f003ad68a6f90fb139e9ecb917169135761ec97..eb77588b2ecc23fad0e307cb2bf94a8aa6147a4b 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,
boliu 2017/02/06 13:08:09 IPC handlers are grouped together
aelias_OOO_until_Jul13 2017/02/07 20:48:13 Done.
+ base::string16 text,
+ base::string16 html);
+
// Request a one-time snapshot of the accessibility tree without changing
// the accessibility mode.
void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
@@ -1056,6 +1063,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