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

Side by Side Diff: components/web_view/public/interfaces/web_view.mojom

Issue 1371773003: mandoline: Add find in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: General patch cleanup. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module web_view.mojom; 5 module web_view.mojom;
6 6
7 import "components/mus/public/interfaces/view_tree.mojom"; 7 import "components/mus/public/interfaces/view_tree.mojom";
8 import "network/public/interfaces/url_loader.mojom"; 8 import "network/public/interfaces/url_loader.mojom";
9 9
10 enum ButtonState { 10 enum ButtonState {
11 ENABLED, 11 ENABLED,
12 DISABLED, 12 DISABLED,
13 }; 13 };
14 14
15 interface WebViewClient { 15 interface WebViewClient {
16 // Page-generated request for a top level frame navigation. 16 // Page-generated request for a top level frame navigation.
17 TopLevelNavigateRequest(mojo.URLRequest request); 17 TopLevelNavigateRequest(mojo.URLRequest request);
18 18
19 // Notification that the navigation has started. This can be useful for 19 // Notification that the navigation has started. This can be useful for
20 // navigations triggered from sources other than the page itself (e.g. 20 // navigations triggered from sources other than the page itself (e.g.
21 // back/forward history navigation). 21 // back/forward history navigation).
22 TopLevelNavigationStarted(string url); 22 TopLevelNavigationStarted(string url);
23 23
24 // Loading and progress notifications. 24 // Loading and progress notifications.
25 LoadingStateChanged(bool is_loading, double progress); 25 LoadingStateChanged(bool is_loading, double progress);
26 BackForwardChanged(ButtonState back_button, ButtonState forward_button); 26 BackForwardChanged(ButtonState back_button, ButtonState forward_button);
27 27
28 // TODO(beng): also forward text direction. 28 // TODO(beng): also forward text direction.
29 TitleChanged(string? title); 29 TitleChanged(string? title);
30
31 // Reports the number of matches for a given find.
32 ReportFindInPageMatchCount(int32 request_id, int32 count, bool final_update);
33
34 // Reports which match is currently highlighted.
35 ReportFindInPageSelection(int32 request_id, int32 active_match_ordinal);
30 }; 36 };
31 37
32 interface WebView { 38 interface WebView {
33 // Navigate the top level frame to |request|. 39 // Navigate the top level frame to |request|.
34 LoadRequest(mojo.URLRequest request); 40 LoadRequest(mojo.URLRequest request);
35 41
36 // Provide a ViewTreeClient for this specific WebView. 42 // Provide a ViewTreeClient for this specific WebView.
37 GetViewTreeClient(mojo.ViewTreeClient& view_tree_client); 43 GetViewTreeClient(mojo.ViewTreeClient& view_tree_client);
38 44
45 // Finds a string in page.
46 Find(int32 request_id, string search_text);
47 StopFinding();
48
39 // Moves forward and backward. 49 // Moves forward and backward.
40 GoBack(); 50 GoBack();
41 GoForward(); 51 GoForward();
42 }; 52 };
43 53
44 interface WebViewFactory { 54 interface WebViewFactory {
45 CreateWebView(WebViewClient client, WebView& web_view); 55 CreateWebView(WebViewClient client, WebView& web_view);
46 }; 56 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698