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_UI_SEARCH_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // The search mode in the active tab has changed. Bind |instant_tab_| if the | 43 // The search mode in the active tab has changed. Bind |instant_tab_| if the |
44 // |new_mode| reflects an Instant search results page. | 44 // |new_mode| reflects an Instant search results page. |
45 void SearchModeChanged(const SearchMode& old_mode, | 45 void SearchModeChanged(const SearchMode& old_mode, |
46 const SearchMode& new_mode); | 46 const SearchMode& new_mode); |
47 | 47 |
48 // The user switched tabs. Bind |instant_tab_| if the newly active tab is an | 48 // The user switched tabs. Bind |instant_tab_| if the newly active tab is an |
49 // Instant search results page. | 49 // Instant search results page. |
50 void ActiveTabChanged(); | 50 void ActiveTabChanged(); |
51 | 51 |
52 // Used by BrowserInstantController to notify InstantController about the | |
53 // instant support change event for the active web contents. | |
54 void InstantSupportChanged(InstantSupportState instant_support); | |
55 | |
56 // Resets list of debug events. | 52 // Resets list of debug events. |
57 void ClearDebugEvents(); | 53 void ClearDebugEvents(); |
58 | 54 |
59 // See comments for |debug_events_| below. | 55 // See comments for |debug_events_| below. |
60 const std::list<std::pair<int64_t, std::string>>& debug_events() { | 56 const std::list<std::pair<int64_t, std::string>>& debug_events() { |
61 return debug_events_; | 57 return debug_events_; |
62 } | 58 } |
63 | 59 |
64 private: | 60 private: |
65 friend class InstantExtendedManualTest; | 61 friend class InstantExtendedManualTest; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // The search model mode for the active tab. | 109 // The search model mode for the active tab. |
114 SearchMode search_mode_; | 110 SearchMode search_mode_; |
115 | 111 |
116 // List of events and their timestamps, useful in debugging Instant behaviour. | 112 // List of events and their timestamps, useful in debugging Instant behaviour. |
117 mutable std::list<std::pair<int64_t, std::string>> debug_events_; | 113 mutable std::list<std::pair<int64_t, std::string>> debug_events_; |
118 | 114 |
119 DISALLOW_COPY_AND_ASSIGN(InstantController); | 115 DISALLOW_COPY_AND_ASSIGN(InstantController); |
120 }; | 116 }; |
121 | 117 |
122 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ | 118 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ |
OLD | NEW |