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

Side by Side Diff: services/navigation/public/interfaces/view.mojom

Issue 2055553002: Send Navigation notifications to clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
« no previous file with comments | « services/navigation/navigation_unittest.cc ('k') | services/navigation/view_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 navigation.mojom; 5 module navigation.mojom;
6 6
7 import "components/mus/public/interfaces/window_tree.mojom"; 7 import "components/mus/public/interfaces/window_tree.mojom";
8 import "ui/gfx/geometry/mojo/geometry.mojom"; 8 import "ui/gfx/geometry/mojo/geometry.mojom";
9 import "url/mojo/url.mojom"; 9 import "url/mojo/url.mojom";
10 10
11 // Copied from //content/public/browser/navigation_entry.h
12 struct NavigationEntry {
13 int32 id;
14 url.mojom.Url url;
15 string title;
16 array<url.mojom.Url> redirect_chain;
17 };
18
19 // Copied from //content/public/browser/navigation_type.h
20 enum NavigationType {
21 UNKNOWN,
22 NEW_PAGE,
23 EXISTING_PAGE,
24 SAME_PAGE,
25 NEW_SUBFRAME,
26 AUTO_SUBFRAME,
27 NAV_IGNORE
28 };
29
30 // Copied from //content/public/browser/navigation_details.h
31 struct NavigationCommittedDetails {
32 int32 entry;
33 NavigationType type;
34 int32 previous_entry_index;
35 url.mojom.Url previous_url;
36 bool did_replace_entry;
37 bool is_in_page;
38 bool is_main_frame;
39 // SSLStatus ssl_status;
40 int32 http_status_code;
41 };
42
11 interface ViewFactory { 43 interface ViewFactory {
12 CreateView(ViewClient client, View& view); 44 CreateView(ViewClient client, View& view);
13 }; 45 };
14 46
15 interface ViewClient { 47 interface ViewClient {
16 LoadingStateChanged(bool is_loading); 48 LoadingStateChanged(bool is_loading);
17 NavigationStateChanged(url.mojom.Url url, 49 NavigationStateChanged(url.mojom.Url url,
18 string title, 50 string title,
19 bool can_go_back, 51 bool can_go_back,
20 bool can_go_forward); 52 bool can_go_forward);
21 LoadProgressChanged(double progress); 53 LoadProgressChanged(double progress);
22 UpdateHoverURL(url.mojom.Url url); 54 UpdateHoverURL(url.mojom.Url url);
23 55
24 ViewCreated(View view, 56 ViewCreated(View view,
25 ViewClient& client, 57 ViewClient& client,
26 bool is_popup, 58 bool is_popup,
27 gfx.mojom.Rect initial_rect, 59 gfx.mojom.Rect initial_rect,
28 bool user_gesture); 60 bool user_gesture);
29 Close(); 61 Close();
62
63 // See //content/public/browser/notification_types.h for descriptions of
64 // these events.
65 NavigationPending(NavigationEntry entry);
66 NavigationCommitted(NavigationCommittedDetails details,
67 int32 current_index);
68 NavigationListPruned(bool from_front, int32 count);
69 NavigationEntryChanged(NavigationEntry entry, int32 entry_index);
30 }; 70 };
31 71
32 interface View { 72 interface View {
33 // Navigates the view to |url|. 73 // Navigates the view to |url|.
34 NavigateTo(url.mojom.Url url); 74 NavigateTo(url.mojom.Url url);
35 75
36 GoBack(); 76 GoBack();
37 GoForward(); 77 GoForward();
78 NavigateToOffset(int32 offset);
38 Reload(bool skip_cache); 79 Reload(bool skip_cache);
39 Stop(); 80 Stop();
40 81
41 // Obtains a Mus WindowTreeClient for the View, so it can be embedded in a 82 // Obtains a Mus WindowTreeClient for the View, so it can be embedded in a
42 // UI. 83 // UI.
43 GetWindowTreeClient(mus.mojom.WindowTreeClient& client); 84 GetWindowTreeClient(mus.mojom.WindowTreeClient& client);
44 85
45 ShowInterstitial(string html); 86 ShowInterstitial(string html);
46 HideInterstitial(); 87 HideInterstitial();
47 88
48 // The resize area is a rectangle in the bottom corner of the view that allows 89 // The resize area is a rectangle in the bottom corner of the view that allows
49 // the top-level window containing the view to be interactively resized. 90 // the top-level window containing the view to be interactively resized.
50 SetResizerSize(gfx.mojom.Size size); 91 SetResizerSize(gfx.mojom.Size size);
51 }; 92 };
OLDNEW
« no previous file with comments | « services/navigation/navigation_unittest.cc ('k') | services/navigation/view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698