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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 // Called when the |overlay_| might be stale. If it's actually stale, and the | 168 // Called when the |overlay_| might be stale. If it's actually stale, and the |
169 // omnibox doesn't have focus, and the overlay isn't showing, the |overlay_| | 169 // omnibox doesn't have focus, and the overlay isn't showing, the |overlay_| |
170 // is deleted and recreated. Else the refresh is skipped. | 170 // is deleted and recreated. Else the refresh is skipped. |
171 void ReloadOverlayIfStale(); | 171 void ReloadOverlayIfStale(); |
172 | 172 |
173 // Adds a new event to |debug_events_| and also DVLOG's it. Ensures that | 173 // Adds a new event to |debug_events_| and also DVLOG's it. Ensures that |
174 // |debug_events_| doesn't get too large. | 174 // |debug_events_| doesn't get too large. |
175 void LogDebugEvent(const std::string& info) const; | 175 void LogDebugEvent(const std::string& info) const; |
176 | 176 |
| 177 // Resets list of debug events. |
| 178 void ClearDebugEvents(); |
| 179 |
177 // See comments for |debug_events_| below. | 180 // See comments for |debug_events_| below. |
178 const std::list<std::pair<int64, std::string> >& debug_events() { | 181 const std::list<std::pair<int64, std::string> >& debug_events() { |
179 return debug_events_; | 182 return debug_events_; |
180 } | 183 } |
181 | 184 |
182 // Returns the transition type of the last AutocompleteMatch passed to Update. | 185 // Returns the transition type of the last AutocompleteMatch passed to Update. |
183 content::PageTransition last_transition_type() const { | 186 content::PageTransition last_transition_type() const { |
184 return last_transition_type_; | 187 return last_transition_type_; |
185 } | 188 } |
186 | 189 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 // Used for Top Sites async retrieval. | 444 // Used for Top Sites async retrieval. |
442 base::WeakPtrFactory<InstantController> weak_ptr_factory_; | 445 base::WeakPtrFactory<InstantController> weak_ptr_factory_; |
443 | 446 |
444 // Used to get notifications about Most Visted changes. | 447 // Used to get notifications about Most Visted changes. |
445 content::NotificationRegistrar registrar_; | 448 content::NotificationRegistrar registrar_; |
446 | 449 |
447 DISALLOW_COPY_AND_ASSIGN(InstantController); | 450 DISALLOW_COPY_AND_ASSIGN(InstantController); |
448 }; | 451 }; |
449 | 452 |
450 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 453 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |