OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Are we showing instant results? | 86 // Are we showing instant results? |
87 bool is_showing_instant() const { return template_url_id_ != 0; } | 87 bool is_showing_instant() const { return template_url_id_ != 0; } |
88 | 88 |
89 // If we're showing instant this returns non-zero. | 89 // If we're showing instant this returns non-zero. |
90 TemplateURLID template_url_id() const { return template_url_id_; } | 90 TemplateURLID template_url_id() const { return template_url_id_; } |
91 | 91 |
92 // See description above field. | 92 // See description above field. |
93 const string16& user_text() const { return user_text_; } | 93 const string16& user_text() const { return user_text_; } |
94 | 94 |
| 95 // See description above field. |
| 96 const string16& complete_suggested_text() const { |
| 97 return complete_suggested_text_; |
| 98 } |
| 99 |
95 private: | 100 private: |
96 friend class InstantLoaderManagerTest; | 101 friend class InstantLoaderManagerTest; |
97 class FrameLoadObserver; | 102 class FrameLoadObserver; |
98 class PaintObserverImpl; | 103 class PaintObserverImpl; |
99 class TabContentsDelegateImpl; | 104 class TabContentsDelegateImpl; |
100 | 105 |
101 // Invoked when the page wants to update the suggested text. If |user_text_| | 106 // Invoked when the page wants to update the suggested text. If |user_text_| |
102 // starts with |suggested_text|, then the delegate is notified of the change, | 107 // starts with |suggested_text|, then the delegate is notified of the change, |
103 // which results in updating the omnibox. | 108 // which results in updating the omnibox. |
104 void SetCompleteSuggestedText(const string16& suggested_text); | 109 void SetCompleteSuggestedText(const string16& suggested_text); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // Used to get notifications about renderers coming and going. | 188 // Used to get notifications about renderers coming and going. |
184 NotificationRegistrar registrar_; | 189 NotificationRegistrar registrar_; |
185 | 190 |
186 // Last value of verbatim passed to |Update|. | 191 // Last value of verbatim passed to |Update|. |
187 bool verbatim_; | 192 bool verbatim_; |
188 | 193 |
189 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 194 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
190 }; | 195 }; |
191 | 196 |
192 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 197 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
OLD | NEW |