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

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

Issue 2667283007: Refactor Samsung SmartClip implementation. (Closed)
Patch Set: Really apply code review comments 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..11b11d978302c94cded6096cebe5f6eceafd45de 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,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
// renderer process to change the accessibility mode.
void UpdateAccessibilityMode();
+ // Samsung Galaxy Note-specific "smart clip" stylus text getter.
+ void RequestSmartClipExtract(SmartClipCallback callback, gfx::Rect rect);
+
// Request a one-time snapshot of the accessibility tree without changing
// the accessibility mode.
void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
@@ -734,6 +739,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
void OnAccessibilitySnapshotResponse(
int callback_id,
const AXContentTreeUpdate& snapshot);
+ void OnSmartClipDataExtracted(uint32_t id,
+ base::string16 text,
+ base::string16 html);
void OnToggleFullscreen(bool enter_fullscreen);
void OnDidStartLoading(bool to_different_document);
void OnDidStopLoading();
@@ -1058,6 +1066,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
// accessibility tree snapshot calls created by RequestAXTreeSnapshot.
std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_;
+ // Samsung Galaxy Note-specific "smart clip" stylus text getter.
+ std::map<uint32_t, SmartClipCallback> smart_clip_callbacks_;
+
// Callback when an event is received, for testing.
base::Callback<void(RenderFrameHostImpl*, ui::AXEvent, int)>
accessibility_testing_callback_;
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698