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

Unified Diff: content/public/test/content_browser_test_utils.h

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Addressing lfg@'s comment Created 4 years, 3 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
« no previous file with comments | « content/public/test/DEPS ('k') | content/public/test/content_browser_test_utils_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/content_browser_test_utils.h
diff --git a/content/public/test/content_browser_test_utils.h b/content/public/test/content_browser_test_utils.h
index 50a9498dd4e649f608084e9a78339b8b5cf92cbb..856b44ef223f14d0881bafacdf2b9e2e0defa191 100644
--- a/content/public/test/content_browser_test_utils.h
+++ b/content/public/test/content_browser_test_utils.h
@@ -18,6 +18,8 @@ class FilePath;
}
namespace gfx {
+class Point;
+class Range;
class Rect;
}
@@ -143,6 +145,27 @@ class ConsoleObserverDelegate : public WebContentsDelegate {
#if defined OS_MACOSX
void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds);
+
+// This method will request the string (word) at |point| inside the |rwh| where
+// |point| is with respect to the |rwh| coordinates. |result_callback| is called
+// with the word as well as |baselinePoint| when the result comes back from the
+// renderer. The baseline point is the position of the pop-up in AppKit
+// coordinate system (inverted y-axis).
+void GetStringAtPointForRenderWidget(
+ RenderWidgetHost* rwh,
+ const gfx::Point& point,
+ base::Callback<void(const std::string&, const gfx::Point&)>
+ result_callback);
+
+// This method will request the string identified by |range| inside the |rwh|.
+// When the result comes back, |result_callback| is invoked with the given text
+// and its position in AppKit coordinates (inverted-y axis).
+void GetStringFromRangeForRenderWidget(
+ RenderWidgetHost* rwh,
+ const gfx::Range& range,
+ base::Callback<void(const std::string&, const gfx::Point&)>
+ result_callback);
+
#endif
} // namespace content
« no previous file with comments | « content/public/test/DEPS ('k') | content/public/test/content_browser_test_utils_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698