| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Invoked by InstantLoader when the preview gains focus, usually due to the | 146 // Invoked by InstantLoader when the preview gains focus, usually due to the |
| 147 // user clicking on it. | 147 // user clicking on it. |
| 148 void InstantLoaderContentsFocused(); | 148 void InstantLoaderContentsFocused(); |
| 149 | 149 |
| 150 // Invoked by the InstantLoader when its RenderView crashes. | 150 // Invoked by the InstantLoader when its RenderView crashes. |
| 151 void InstantLoaderRenderViewGone(); | 151 void InstantLoaderRenderViewGone(); |
| 152 | 152 |
| 153 // Invoked by InstantLoader when the instant page is about to navigate. | 153 // Invoked by InstantLoader when the instant page is about to navigate. |
| 154 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); | 154 void InstantLoaderAboutToNavigateMainFrame(const GURL& url); |
| 155 | 155 |
| 156 // Invoked by the InstantLoader when the instant page wants to navigate to |
| 157 // the speicfied URL. |
| 158 void NavigateToURL(const GURL& url, content::PageTransition transition); |
| 159 |
| 156 private: | 160 private: |
| 157 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); | 161 FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant); |
| 158 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); | 162 FRIEND_TEST_ALL_PREFIXES(InstantTest, NonInstantSearchProvider); |
| 159 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); | 163 FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); |
| 160 | 164 |
| 161 // Helper for OmniboxFocusChanged. Commit or discard the preview. | 165 // Helper for OmniboxFocusChanged. Commit or discard the preview. |
| 162 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); | 166 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); |
| 163 | 167 |
| 164 // Creates a new loader if necessary, using the instant_url property of the | 168 // Creates a new loader if necessary, using the instant_url property of the |
| 165 // |template_url| (for example, if the Instant URL has changed since the last | 169 // |template_url| (for example, if the Instant URL has changed since the last |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 294 |
| 291 // Whether to allow the preview to show search suggestions. In general, the | 295 // Whether to allow the preview to show search suggestions. In general, the |
| 292 // preview is allowed to show search suggestions whenever |search_mode_| is | 296 // preview is allowed to show search suggestions whenever |search_mode_| is |
| 293 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. | 297 // MODE_SEARCH_SUGGESTIONS, except in those cases where this is false. |
| 294 bool allow_preview_to_show_search_suggestions_; | 298 bool allow_preview_to_show_search_suggestions_; |
| 295 | 299 |
| 296 DISALLOW_COPY_AND_ASSIGN(InstantController); | 300 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 297 }; | 301 }; |
| 298 | 302 |
| 299 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 303 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |