| 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_SEARCH_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "chrome/browser/search/instant_service_observer.h" | 15 #include "chrome/browser/search/instant_service_observer.h" |
| 16 #include "chrome/browser/ui/search/search_ipc_router.h" | 16 #include "chrome/browser/ui/search/search_ipc_router.h" |
| 17 #include "chrome/browser/ui/search/search_model.h" | 17 #include "chrome/browser/ui/search/search_model.h" |
| 18 #include "chrome/common/search/instant_types.h" | 18 #include "chrome/common/search/instant_types.h" |
| 19 #include "chrome/common/search/ntp_logging_events.h" | 19 #include "chrome/common/search/ntp_logging_events.h" |
| 20 #include "components/ntp_tiles/ntp_tile_source.h" |
| 20 #include "components/omnibox/common/omnibox_focus_state.h" | 21 #include "components/omnibox/common/omnibox_focus_state.h" |
| 21 #include "content/public/browser/reload_type.h" | 22 #include "content/public/browser/reload_type.h" |
| 22 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
| 23 #include "content/public/browser/web_contents_user_data.h" | 24 #include "content/public/browser/web_contents_user_data.h" |
| 24 #include "ui/base/window_open_disposition.h" | 25 #include "ui/base/window_open_disposition.h" |
| 25 | 26 |
| 26 namespace content { | 27 namespace content { |
| 27 class WebContents; | 28 class WebContents; |
| 28 struct LoadCommittedDetails; | 29 struct LoadCommittedDetails; |
| 29 } | 30 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void NavigationEntryCommitted( | 140 void NavigationEntryCommitted( |
| 140 const content::LoadCommittedDetails& load_details) override; | 141 const content::LoadCommittedDetails& load_details) override; |
| 141 | 142 |
| 142 // Overridden from SearchIPCRouter::Delegate: | 143 // Overridden from SearchIPCRouter::Delegate: |
| 143 void OnInstantSupportDetermined(bool supports_instant) override; | 144 void OnInstantSupportDetermined(bool supports_instant) override; |
| 144 void FocusOmnibox(OmniboxFocusState state) override; | 145 void FocusOmnibox(OmniboxFocusState state) override; |
| 145 void OnDeleteMostVisitedItem(const GURL& url) override; | 146 void OnDeleteMostVisitedItem(const GURL& url) override; |
| 146 void OnUndoMostVisitedDeletion(const GURL& url) override; | 147 void OnUndoMostVisitedDeletion(const GURL& url) override; |
| 147 void OnUndoAllMostVisitedDeletions() override; | 148 void OnUndoAllMostVisitedDeletions() override; |
| 148 void OnLogEvent(NTPLoggingEventType event, base::TimeDelta time) override; | 149 void OnLogEvent(NTPLoggingEventType event, base::TimeDelta time) override; |
| 149 void OnLogMostVisitedImpression(int position, | 150 void OnLogMostVisitedImpression( |
| 150 NTPLoggingTileSource tile_source) override; | 151 int position, |
| 151 void OnLogMostVisitedNavigation(int position, | 152 ntp_tiles::NTPTileSource tile_source) override; |
| 152 NTPLoggingTileSource tile_source) override; | 153 void OnLogMostVisitedNavigation( |
| 154 int position, |
| 155 ntp_tiles::NTPTileSource tile_source) override; |
| 153 void PasteIntoOmnibox(const base::string16& text) override; | 156 void PasteIntoOmnibox(const base::string16& text) override; |
| 154 void OnChromeIdentityCheck(const base::string16& identity) override; | 157 void OnChromeIdentityCheck(const base::string16& identity) override; |
| 155 void OnHistorySyncCheck() override; | 158 void OnHistorySyncCheck() override; |
| 156 | 159 |
| 157 // Overridden from InstantServiceObserver: | 160 // Overridden from InstantServiceObserver: |
| 158 void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) override; | 161 void ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) override; |
| 159 void MostVisitedItemsChanged( | 162 void MostVisitedItemsChanged( |
| 160 const std::vector<InstantMostVisitedItem>& items) override; | 163 const std::vector<InstantMostVisitedItem>& items) override; |
| 161 | 164 |
| 162 // Invoked to update the instant support state. | 165 // Invoked to update the instant support state. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 200 |
| 198 // Delegate for notifying our owner about the SearchTabHelper state. Not owned | 201 // Delegate for notifying our owner about the SearchTabHelper state. Not owned |
| 199 // by us. | 202 // by us. |
| 200 // NULL on iOS and Android because they don't use the Instant framework. | 203 // NULL on iOS and Android because they don't use the Instant framework. |
| 201 SearchTabHelperDelegate* delegate_; | 204 SearchTabHelperDelegate* delegate_; |
| 202 | 205 |
| 203 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 206 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 204 }; | 207 }; |
| 205 | 208 |
| 206 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 209 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |