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

Unified Diff: components/web_view/frame.h

Issue 1371773003: mandoline: Add find in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Further patch cleanup; use a WeakPtrFactory in FindController. Created 5 years, 2 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: components/web_view/frame.h
diff --git a/components/web_view/frame.h b/components/web_view/frame.h
index 380bc8e822d6b860f75860f388f047fb430c0ea6..ff4634b49a651865ecc1bcf794fd15a9bd88bfc1 100644
--- a/components/web_view/frame.h
+++ b/components/web_view/frame.h
@@ -54,6 +54,7 @@ enum class ViewOwnership {
class Frame : public mus::ViewObserver, public mojom::Frame {
public:
using ClientPropertyMap = std::map<std::string, std::vector<uint8_t>>;
+ using FindCallback = mojo::Callback<void(bool)>;
Frame(FrameTree* tree,
mus::View* view,
@@ -112,6 +113,15 @@ class Frame : public mus::ViewObserver, public mojom::Frame {
// children, as well as the number of Frames accumulated.
double GatherProgress(int* frame_count) const;
+ void Find(int32_t request_id,
+ const mojo::String& search_text,
+ const FindCallback& callback);
+ void StopFinding(bool clear_selection);
+ void ScopeStringMatches(int32_t request_id,
+ const mojo::String& search_text,
+ bool reset);
+ void CancelPendingScopingEffort();
+
private:
friend class FrameTest;
friend class FrameTree;
@@ -224,6 +234,11 @@ class Frame : public mus::ViewObserver, public mojom::Frame {
mojo::URLRequestPtr request) override;
void DidNavigateLocally(const mojo::String& url) override;
void DispatchLoadEventToParent() override;
+ void OnReportFindInFrameMatchCount(int32_t request_id,
+ int32_t count,
+ bool final_update) override;
+ void OnReportFindInPageSelection(int32_t request_id,
+ int32_t active_match_ordinal) override;
FrameTree* const tree_;
// WARNING: this may be null. See class description for details.

Powered by Google App Engine
This is Rietveld 408576698