OLD | NEW |
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 chrome.mojom; | 5 module chrome.mojom; |
6 | 6 |
7 import "mojo/common/string16.mojom"; | 7 import "mojo/common/string16.mojom"; |
8 import "mojo/common/time.mojom"; | 8 import "mojo/common/time.mojom"; |
9 import "url/mojo/url.mojom"; | 9 import "url/mojo/url.mojom"; |
10 | 10 |
11 [Native] | 11 [Native] |
12 enum NTPLoggingEventType; | 12 enum NTPLoggingEventType; |
13 | 13 |
14 [Native] | 14 [Native] |
15 enum OmniboxFocusState; | 15 enum OmniboxFocusState; |
16 | 16 |
17 [Native] | 17 [Native] |
18 enum NTPTileSource; | 18 enum NTPTileSource; |
19 | 19 |
| 20 // Interface used to connect to the embedded search interface. This is a |
| 21 // separate interface such that a reverse connection (|client| below) can be |
| 22 // passed when connecting. |
| 23 interface EmbeddedSearchConnector { |
| 24 // Connect to the interface. |instant| is the connection which the client will |
| 25 // use to query the embedded search interface. |client| is the connection used |
| 26 // by the embedded search interface implementation to push browser state |
| 27 // updates to the client. |
| 28 Connect(associated Instant& instant, associated SearchBox client); |
| 29 }; |
| 30 |
| 31 // TODO(tibell): Rename this to EmbeddedSearch. |
| 32 // |
| 33 // Browser interface to support embedded search. Render frames connect to this |
| 34 // interface to query browser data, such as the most visited pages. |
20 interface Instant { | 35 interface Instant { |
21 // Tells InstantExtended whether the embedded search API is supported. | 36 // Tells InstantExtended whether the embedded search API is supported. |
22 // See http://dev.chromium.org/embeddedsearch | 37 // See http://dev.chromium.org/embeddedsearch |
23 InstantSupportDetermined(int32 page_seq_no, bool result); | 38 InstantSupportDetermined(int32 page_seq_no, bool result); |
24 | 39 |
25 // Tells InstantExtended to set the omnibox focus state. | 40 // Tells InstantExtended to set the omnibox focus state. |
26 FocusOmnibox(int32 page_seq_no, OmniboxFocusState state); | 41 FocusOmnibox(int32 page_seq_no, OmniboxFocusState state); |
27 | 42 |
28 // Tells InstantExtended to delete a most visited item. | 43 // Tells InstantExtended to delete a most visited item. |
29 DeleteMostVisitedItem(int32 page_seq_no, url.mojom.Url url); | 44 DeleteMostVisitedItem(int32 page_seq_no, url.mojom.Url url); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 85 |
71 [Native] | 86 [Native] |
72 struct InstantSuggestion; | 87 struct InstantSuggestion; |
73 | 88 |
74 [Native] | 89 [Native] |
75 struct EmbeddedSearchRequestParams; | 90 struct EmbeddedSearchRequestParams; |
76 | 91 |
77 [Native] | 92 [Native] |
78 struct ThemeBackgroundInfo; | 93 struct ThemeBackgroundInfo; |
79 | 94 |
| 95 // TODO(tibell): Rename this to EmbeddedSearchClient. |
| 96 // |
| 97 // Renderer interface used by the browser to push updates to the client. For |
| 98 // example, the browser will tell the frame if the omnibox got focus. |
80 interface SearchBox { | 99 interface SearchBox { |
81 SetPageSequenceNumber(int32 page_seq_no); | 100 SetPageSequenceNumber(int32 page_seq_no); |
82 | 101 |
83 DetermineIfPageSupportsInstant(); | 102 DetermineIfPageSupportsInstant(); |
84 | 103 |
85 FocusChanged(OmniboxFocusState new_focus_state, | 104 FocusChanged(OmniboxFocusState new_focus_state, |
86 OmniboxFocusChangeReason reason); | 105 OmniboxFocusChangeReason reason); |
87 | 106 |
88 MostVisitedChanged(array<InstantMostVisitedItem> items); | 107 MostVisitedChanged(array<InstantMostVisitedItem> items); |
89 | 108 |
90 SetInputInProgress(bool input_in_progress); | 109 SetInputInProgress(bool input_in_progress); |
91 | 110 |
92 SetSuggestionToPrefetch(InstantSuggestion suggestion); | 111 SetSuggestionToPrefetch(InstantSuggestion suggestion); |
93 | 112 |
94 Submit(mojo.common.mojom.String16 value, | 113 Submit(mojo.common.mojom.String16 value, |
95 EmbeddedSearchRequestParams params); | 114 EmbeddedSearchRequestParams params); |
96 | 115 |
97 ThemeChanged(ThemeBackgroundInfo value); | 116 ThemeChanged(ThemeBackgroundInfo value); |
98 | 117 |
| 118 // TODO(treib): Remove the *Result methods and instead add return values to |
| 119 // the correspnding methods in the Instant interface above. |
99 HistorySyncCheckResult(bool sync_history); | 120 HistorySyncCheckResult(bool sync_history); |
100 | 121 |
101 ChromeIdentityCheckResult(mojo.common.mojom.String16 identity, | 122 ChromeIdentityCheckResult(mojo.common.mojom.String16 identity, |
102 bool identity_match); | 123 bool identity_match); |
103 }; | 124 }; |
OLD | NEW |