| 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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Invoked by InstantLoader when the preview gains focus, usually due to the | 141 // Invoked by InstantLoader when the preview gains focus, usually due to the |
| 142 // user clicking on it. | 142 // user clicking on it. |
| 143 void InstantLoaderContentsFocused(); | 143 void InstantLoaderContentsFocused(); |
| 144 | 144 |
| 145 // Invoked by the InstantLoader when its RenderView crashes. | 145 // Invoked by the InstantLoader when its RenderView crashes. |
| 146 void InstantLoaderRenderViewGone(); | 146 void InstantLoaderRenderViewGone(); |
| 147 | 147 |
| 148 // Invoked by InstantLoader when the instant page is about to navigate. | 148 // Invoked by InstantLoader when the instant page is about to navigate. |
| 149 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); | 149 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); |
| 150 | 150 |
| 151 // Invoked by the InstantLoader when the instant page wants to navigate to |
| 152 // the speicfied URL. |
| 153 void NavigateToURL(const GURL& url); |
| 154 |
| 151 private: | 155 private: |
| 152 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); | 156 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); |
| 153 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); | 157 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); |
| 154 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); | 158 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); |
| 155 | 159 |
| 156 // Creates a new loader if necessary, using the instant_url property of the | 160 // Creates a new loader if necessary, using the instant_url property of the |
| 157 // |template_url| (for example, if the Instant URL has changed since the last | 161 // |template_url| (for example, if the Instant URL has changed since the last |
| 158 // time the loader was created). Returns false if the |template_url| doesn't | 162 // time the loader was created). Returns false if the |template_url| doesn't |
| 159 // have a valid Instant URL; true otherwise. | 163 // have a valid Instant URL; true otherwise. |
| 160 bool ResetLoader(const TemplateURL* template_url, | 164 bool ResetLoader(const TemplateURL* template_url, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 286 |
| 283 // Whether to allow the preview to show search suggestions. In general, the | 287 // Whether to allow the preview to show search suggestions. In general, the |
| 284 // preview is allowed to show search suggestions whenever |search_mode_| is | 288 // preview is allowed to show search suggestions whenever |search_mode_| is |
| 285 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 289 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
| 286 bool allow_preview_to_show_search_suggestions_; | 290 bool allow_preview_to_show_search_suggestions_; |
| 287 | 291 |
| 288 DISALLOW_COPY_AND_ASSIGN(InstantController); | 292 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 289 }; | 293 }; |
| 290 | 294 |
| 291 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 295 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |