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