| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Releases the preview TabContents passing ownership to the caller. This is | 124 // Releases the preview TabContents passing ownership to the caller. This is |
| 125 // intended to be called when the preview TabContents is committed. This does | 125 // intended to be called when the preview TabContents is committed. This does |
| 126 // not notify the delegate. | 126 // not notify the delegate. |
| 127 // WARNING: be sure and invoke CompleteRelease after adding the returned | 127 // WARNING: be sure and invoke CompleteRelease after adding the returned |
| 128 // TabContents to a tabstrip. | 128 // TabContents to a tabstrip. |
| 129 TabContentsWrapper* ReleasePreviewContents(InstantCommitType type); | 129 TabContentsWrapper* ReleasePreviewContents(InstantCommitType type); |
| 130 | 130 |
| 131 // Does cleanup after the preview contents has been added to the tabstrip. | 131 // Does cleanup after the preview contents has been added to the tabstrip. |
| 132 // Invoke this if you explicitly invoke ReleasePreviewContents. | 132 // Invoke this if you explicitly invoke ReleasePreviewContents. |
| 133 void CompleteRelease(TabContents* tab); | 133 void CompleteRelease(TabContentsWrapper* tab); |
| 134 | 134 |
| 135 // TabContents the match is being shown for. | 135 // TabContents the match is being shown for. |
| 136 TabContentsWrapper* tab_contents() const { return tab_contents_; } | 136 TabContentsWrapper* tab_contents() const { return tab_contents_; } |
| 137 | 137 |
| 138 // The preview TabContents; may be null. | 138 // The preview TabContents; may be null. |
| 139 TabContentsWrapper* GetPreviewContents(); | 139 TabContentsWrapper* GetPreviewContents(); |
| 140 | 140 |
| 141 // Returns true if |Update| has been invoked without a corresponding call to | 141 // Returns true if |Update| has been invoked without a corresponding call to |
| 142 // |DestroyPreviewContents| or |CommitCurrentPreview|. | 142 // |DestroyPreviewContents| or |CommitCurrentPreview|. |
| 143 bool is_active() const { return is_active_; } | 143 bool is_active() const { return is_active_; } |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 ScopedVector<InstantLoader> loaders_to_destroy_; | 296 ScopedVector<InstantLoader> loaders_to_destroy_; |
| 297 | 297 |
| 298 // The set of hosts that we don't use instant with. This is shared across all | 298 // The set of hosts that we don't use instant with. This is shared across all |
| 299 // instances and only maintained for the current session. | 299 // instances and only maintained for the current session. |
| 300 static HostBlacklist* host_blacklist_; | 300 static HostBlacklist* host_blacklist_; |
| 301 | 301 |
| 302 DISALLOW_COPY_AND_ASSIGN(InstantController); | 302 DISALLOW_COPY_AND_ASSIGN(InstantController); |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 305 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
| OLD | NEW |