| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 bool commit_on_mouse_up() const { return commit_on_mouse_up_; } | 114 bool commit_on_mouse_up() const { return commit_on_mouse_up_; } |
| 115 | 115 |
| 116 // Returns true if the mouse is down as the result of activating the preview | 116 // Returns true if the mouse is down as the result of activating the preview |
| 117 // content. | 117 // content. |
| 118 bool IsMouseDownFromActivate(); | 118 bool IsMouseDownFromActivate(); |
| 119 | 119 |
| 120 // The autocomplete edit that was initiating the current instant session has | 120 // The autocomplete edit that was initiating the current instant session has |
| 121 // lost focus. Commit or discard the preview accordingly. | 121 // lost focus. Commit or discard the preview accordingly. |
| 122 void OnAutocompleteLostFocus(gfx::NativeView view_gaining_focus); | 122 void OnAutocompleteLostFocus(gfx::NativeView view_gaining_focus); |
| 123 | 123 |
| 124 // The autocomplete edit has gained focus. Preload the instant URL of the |
| 125 // default search engine, in anticipation of the user typing a query. |
| 126 void OnAutocompleteGotFocus(TabContentsWrapper* tab_contents); |
| 127 |
| 124 // Releases the preview TabContents passing ownership to the caller. This is | 128 // Releases the preview TabContents passing ownership to the caller. This is |
| 125 // intended to be called when the preview TabContents is committed. This does | 129 // intended to be called when the preview TabContents is committed. This does |
| 126 // not notify the delegate. | 130 // not notify the delegate. |
| 127 // WARNING: be sure and invoke CompleteRelease after adding the returned | 131 // WARNING: be sure and invoke CompleteRelease after adding the returned |
| 128 // TabContents to a tabstrip. | 132 // TabContents to a tabstrip. |
| 129 TabContentsWrapper* ReleasePreviewContents(InstantCommitType type); | 133 TabContentsWrapper* ReleasePreviewContents(InstantCommitType type); |
| 130 | 134 |
| 131 // Does cleanup after the preview contents has been added to the tabstrip. | 135 // Does cleanup after the preview contents has been added to the tabstrip. |
| 132 // Invoke this if you explicitly invoke ReleasePreviewContents. | 136 // Invoke this if you explicitly invoke ReleasePreviewContents. |
| 133 void CompleteRelease(TabContentsWrapper* tab); | 137 void CompleteRelease(TabContentsWrapper* tab); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 ScopedVector<InstantLoader> loaders_to_destroy_; | 301 ScopedVector<InstantLoader> loaders_to_destroy_; |
| 298 | 302 |
| 299 // The set of hosts that we don't use instant with. This is shared across all | 303 // The set of hosts that we don't use instant with. This is shared across all |
| 300 // instances and only maintained for the current session. | 304 // instances and only maintained for the current session. |
| 301 static HostBlacklist* host_blacklist_; | 305 static HostBlacklist* host_blacklist_; |
| 302 | 306 |
| 303 DISALLOW_COPY_AND_ASSIGN(InstantController); | 307 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 304 }; | 308 }; |
| 305 | 309 |
| 306 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 310 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |