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_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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Calls through to method of same name on delegate. | 68 // Calls through to method of same name on delegate. |
69 bool ShouldCommitInstantOnMouseUp(); | 69 bool ShouldCommitInstantOnMouseUp(); |
70 void CommitInstantLoader(); | 70 void CommitInstantLoader(); |
71 | 71 |
72 // Preload |template_url|'s instant URL, if the loader doesn't already have | 72 // Preload |template_url|'s instant URL, if the loader doesn't already have |
73 // a |preview_contents()| for it. | 73 // a |preview_contents()| for it. |
74 void MaybeLoadInstantURL(TabContentsWrapper* tab_contents, | 74 void MaybeLoadInstantURL(TabContentsWrapper* tab_contents, |
75 const TemplateURL* template_url); | 75 const TemplateURL* template_url); |
76 | 76 |
77 // NotificationObserver: | 77 // NotificationObserver: |
78 virtual void Observe(NotificationType type, | 78 virtual void Observe(int type, |
79 const NotificationSource& source, | 79 const NotificationSource& source, |
80 const NotificationDetails& details) OVERRIDE; | 80 const NotificationDetails& details) OVERRIDE; |
81 | 81 |
82 // The preview TabContents; may be null. | 82 // The preview TabContents; may be null. |
83 TabContentsWrapper* preview_contents() const { | 83 TabContentsWrapper* preview_contents() const { |
84 return preview_contents_.get(); | 84 return preview_contents_.get(); |
85 } | 85 } |
86 | 86 |
87 // Returns true if the preview TabContents is ready to be shown. | 87 // Returns true if the preview TabContents is ready to be shown. |
88 bool ready() const { return ready_; } | 88 bool ready() const { return ready_; } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // Last value of verbatim passed to |Update|. | 225 // Last value of verbatim passed to |Update|. |
226 bool verbatim_; | 226 bool verbatim_; |
227 | 227 |
228 // True if the page needs to be reloaded. | 228 // True if the page needs to be reloaded. |
229 bool needs_reload_; | 229 bool needs_reload_; |
230 | 230 |
231 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 231 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
232 }; | 232 }; |
233 | 233 |
234 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 234 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
OLD | NEW |