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_LOADER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Initializes |preview_contents_| and loads |instant_url_|. | 59 // Initializes |preview_contents_| and loads |instant_url_|. |
60 void Init(); | 60 void Init(); |
61 | 61 |
62 // Tells the preview page that the user typed |user_text| into the omnibox. | 62 // Tells the preview page that the user typed |user_text| into the omnibox. |
63 // If |verbatim| is false, the page predicts the query the user means to type | 63 // If |verbatim| is false, the page predicts the query the user means to type |
64 // and fetches results for the prediction. If |verbatim| is true, |user_text| | 64 // and fetches results for the prediction. If |verbatim| is true, |user_text| |
65 // is taken as the exact query (no prediction is made). | 65 // is taken as the exact query (no prediction is made). |
66 void Update(const string16& user_text, bool verbatim); | 66 void Update(const string16& user_text, bool verbatim); |
67 | 67 |
68 // Tells the preview page of the bounds of the omnibox dropdown (in screen | 68 // Tells the preview page of the bounds of the omnibox popup (in screen |
69 // coordinates). This is used by the page to offset the results to avoid them | 69 // coordinates). This is used by the page to offset the results to avoid them |
70 // being covered by the omnibox dropdown. | 70 // being covered by the omnibox dropdown. |
71 void SetOmniboxBounds(const gfx::Rect& bounds); | 71 void SetPopupBounds(const gfx::Rect& bounds); |
| 72 |
| 73 // Tells the preview page what size start and end margins to use. |
| 74 void SetMarginSize(int start, int end); |
72 | 75 |
73 // Tells the preview page about the available autocomplete results. | 76 // Tells the preview page about the available autocomplete results. |
74 void SendAutocompleteResults( | 77 void SendAutocompleteResults( |
75 const std::vector<InstantAutocompleteResult>& results); | 78 const std::vector<InstantAutocompleteResult>& results); |
76 | 79 |
77 // Tells the preview page about the current theme background. | 80 // Tells the preview page about the current theme background. |
78 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); | 81 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); |
79 | 82 |
80 // Tells the preview page about the current theme area height. | 83 // Tells the preview page about the current theme area height. |
81 void SendThemeAreaHeight(int height); | 84 void SendThemeAreaHeight(int height); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Used to get notifications about renderers coming and going. | 161 // Used to get notifications about renderers coming and going. |
159 content::NotificationRegistrar registrar_; | 162 content::NotificationRegistrar registrar_; |
160 | 163 |
161 // See comments on the getter above. | 164 // See comments on the getter above. |
162 history::HistoryAddPageArgs last_navigation_; | 165 history::HistoryAddPageArgs last_navigation_; |
163 | 166 |
164 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 167 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
165 }; | 168 }; |
166 | 169 |
167 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 170 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
OLD | NEW |