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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Tells the page that the user pressed Enter in the omnibox. | 88 // Tells the page that the user pressed Enter in the omnibox. |
89 void Submit(const string16& text); | 89 void Submit(const string16& text); |
90 | 90 |
91 // Tells the page that the user clicked on it. Nothing is being cancelled; the | 91 // Tells the page that the user clicked on it. Nothing is being cancelled; the |
92 // poor choice of name merely reflects the IPC of the same (poor) name. | 92 // poor choice of name merely reflects the IPC of the same (poor) name. |
93 void Cancel(const string16& text); | 93 void Cancel(const string16& text); |
94 | 94 |
95 // Tells the page the bounds of the omnibox dropdown (in screen coordinates). | 95 // Tells the page the bounds of the omnibox dropdown (in screen coordinates). |
96 // This is used by the page to offset the results to avoid them being covered | 96 // This is used by the page to offset the results to avoid them being covered |
97 // by the omnibox dropdown. | 97 // by the omnibox dropdown. |
98 void SetOmniboxBounds(const gfx::Rect& bounds); | 98 void SetPopupBounds(const gfx::Rect& bounds); |
| 99 |
| 100 // Tells the page what size start and end margins to use. |
| 101 void SetMarginSize(const int start, const int end); |
99 | 102 |
100 // Tells the renderer to determine if the page supports the Instant API, which | 103 // Tells the renderer to determine if the page supports the Instant API, which |
101 // results in a call to InstantSupportDetermined() when the reply is received. | 104 // results in a call to InstantSupportDetermined() when the reply is received. |
102 void DetermineIfPageSupportsInstant(); | 105 void DetermineIfPageSupportsInstant(); |
103 | 106 |
104 // Tells the page about the available autocomplete results. | 107 // Tells the page about the available autocomplete results. |
105 void SendAutocompleteResults( | 108 void SendAutocompleteResults( |
106 const std::vector<InstantAutocompleteResult>& results); | 109 const std::vector<InstantAutocompleteResult>& results); |
107 | 110 |
108 // Tells the page that the user pressed Up or Down in the omnibox. |count| is | 111 // Tells the page that the user pressed Up or Down in the omnibox. |count| is |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 InstantSizeUnits units); | 152 InstantSizeUnits units); |
150 void StartCapturingKeyStrokes(int page_id); | 153 void StartCapturingKeyStrokes(int page_id); |
151 void StopCapturingKeyStrokes(int page_id); | 154 void StopCapturingKeyStrokes(int page_id); |
152 | 155 |
153 Delegate* const delegate_; | 156 Delegate* const delegate_; |
154 | 157 |
155 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 158 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
156 }; | 159 }; |
157 | 160 |
158 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 161 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
OLD | NEW |