OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Tells the page that the user pressed Enter in the omnibox. | 85 // Tells the page that the user pressed Enter in the omnibox. |
86 void Submit(const string16& text); | 86 void Submit(const string16& text); |
87 | 87 |
88 // Tells the page that the user clicked on it. Nothing is being cancelled; the | 88 // Tells the page that the user clicked on it. Nothing is being cancelled; the |
89 // poor choice of name merely reflects the IPC of the same (poor) name. | 89 // poor choice of name merely reflects the IPC of the same (poor) name. |
90 void Cancel(const string16& text); | 90 void Cancel(const string16& text); |
91 | 91 |
92 // Tells the page the bounds of the omnibox dropdown (in screen coordinates). | 92 // Tells the page the bounds of the omnibox dropdown (in screen coordinates). |
93 // This is used by the page to offset the results to avoid them being covered | 93 // This is used by the page to offset the results to avoid them being covered |
94 // by the omnibox dropdown. | 94 // by the omnibox dropdown. |
95 void SetOmniboxBounds(const gfx::Rect& bounds); | 95 void SetPopupBounds(const gfx::Rect& bounds); |
| 96 |
| 97 // Tells the page what size start and end margins to use. |
| 98 void SetMarginSize(const int start, const int end); |
96 | 99 |
97 // Tells the renderer to determine if the page supports the Instant API, which | 100 // Tells the renderer to determine if the page supports the Instant API, which |
98 // results in a call to InstantSupportDetermined() when the reply is received. | 101 // results in a call to InstantSupportDetermined() when the reply is received. |
99 void DetermineIfPageSupportsInstant(); | 102 void DetermineIfPageSupportsInstant(); |
100 | 103 |
101 // Tells the page about the available autocomplete results. | 104 // Tells the page about the available autocomplete results. |
102 void SendAutocompleteResults( | 105 void SendAutocompleteResults( |
103 const std::vector<InstantAutocompleteResult>& results); | 106 const std::vector<InstantAutocompleteResult>& results); |
104 | 107 |
105 // Tells the page that the user pressed Up or Down in the omnibox. |count| is | 108 // Tells the page that the user pressed Up or Down in the omnibox. |count| is |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 InstantSizeUnits units); | 140 InstantSizeUnits units); |
138 void StartCapturingKeyStrokes(int page_id); | 141 void StartCapturingKeyStrokes(int page_id); |
139 void StopCapturingKeyStrokes(int page_id); | 142 void StopCapturingKeyStrokes(int page_id); |
140 | 143 |
141 Delegate* const delegate_; | 144 Delegate* const delegate_; |
142 | 145 |
143 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 146 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
144 }; | 147 }; |
145 | 148 |
146 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 149 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
OLD | NEW |