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

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: 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 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() call.
32 ReportFindInPageMatchCount(int32 request_id, int32 count, bool final_update);
sky 2015/10/05 15:55:08 Why the Report? Maybe FindInPatchMatchCountUpdated
33
34 // Reports which find match is selected. (If there are five highlighted
35 // matches on a page, and the 2nd is selected, |active_match_ordinal| is 2.)
36 ReportFindInPageSelection(int32 request_id, int32 active_match_ordinal);
30 }; 37 };
31 38
32 interface WebView { 39 interface WebView {
33 // Navigate the top level frame to |request|. 40 // Navigate the top level frame to |request|.
34 LoadRequest(mojo.URLRequest request); 41 LoadRequest(mojo.URLRequest request);
35 42
36 // Provide a ViewTreeClient for this specific WebView. 43 // Provide a ViewTreeClient for this specific WebView.
37 GetViewTreeClient(mojo.ViewTreeClient& view_tree_client); 44 GetViewTreeClient(mojo.ViewTreeClient& view_tree_client);
38 45
46 // Finds a string in page.
sky 2015/10/05 15:55:08 Document what request_id is and any restrictions o
47 Find(int32 request_id, string search_text);
48 StopFinding();
49
39 // Moves forward and backward. 50 // Moves forward and backward.
40 GoBack(); 51 GoBack();
41 GoForward(); 52 GoForward();
42 }; 53 };
43 54
44 interface WebViewFactory { 55 interface WebViewFactory {
45 CreateWebView(WebViewClient client, WebView& web_view); 56 CreateWebView(WebViewClient client, WebView& web_view);
46 }; 57 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698