| 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/omnibox/common/omnibox_focus_state.h" | 20 #include "components/omnibox/common/omnibox_focus_state.h" |
| 21 #include "content/public/browser/reload_type.h" |
| 21 #include "content/public/browser/web_contents_observer.h" | 22 #include "content/public/browser/web_contents_observer.h" |
| 22 #include "content/public/browser/web_contents_user_data.h" | 23 #include "content/public/browser/web_contents_user_data.h" |
| 23 #include "ui/base/window_open_disposition.h" | 24 #include "ui/base/window_open_disposition.h" |
| 24 | 25 |
| 25 namespace content { | 26 namespace content { |
| 26 class WebContents; | 27 class WebContents; |
| 27 struct LoadCommittedDetails; | 28 struct LoadCommittedDetails; |
| 28 } | 29 } |
| 29 | 30 |
| 30 class GURL; | 31 class GURL; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 DetermineIfPageSupportsInstant_NonLocal); | 123 DetermineIfPageSupportsInstant_NonLocal); |
| 123 FRIEND_TEST_ALL_PREFIXES(InstantTabTest, | 124 FRIEND_TEST_ALL_PREFIXES(InstantTabTest, |
| 124 PageURLDoesntBelongToInstantRenderer); | 125 PageURLDoesntBelongToInstantRenderer); |
| 125 FRIEND_TEST_ALL_PREFIXES(InstantTabTest, PageSupportsInstant); | 126 FRIEND_TEST_ALL_PREFIXES(InstantTabTest, PageSupportsInstant); |
| 126 | 127 |
| 127 explicit SearchTabHelper(content::WebContents* web_contents); | 128 explicit SearchTabHelper(content::WebContents* web_contents); |
| 128 | 129 |
| 129 // Overridden from contents::WebContentsObserver: | 130 // Overridden from contents::WebContentsObserver: |
| 130 void DidStartNavigationToPendingEntry( | 131 void DidStartNavigationToPendingEntry( |
| 131 const GURL& url, | 132 const GURL& url, |
| 132 content::NavigationController::ReloadType reload_type) override; | 133 content::ReloadType reload_type) override; |
| 133 void DidNavigateMainFrame( | 134 void DidNavigateMainFrame( |
| 134 const content::LoadCommittedDetails& details, | 135 const content::LoadCommittedDetails& details, |
| 135 const content::FrameNavigateParams& params) override; | 136 const content::FrameNavigateParams& params) override; |
| 136 void DidFinishLoad(content::RenderFrameHost* render_frame_host, | 137 void DidFinishLoad(content::RenderFrameHost* render_frame_host, |
| 137 const GURL& validated_url) override; | 138 const GURL& validated_url) override; |
| 138 void NavigationEntryCommitted( | 139 void NavigationEntryCommitted( |
| 139 const content::LoadCommittedDetails& load_details) override; | 140 const content::LoadCommittedDetails& load_details) override; |
| 140 | 141 |
| 141 // Overridden from SearchIPCRouter::Delegate: | 142 // Overridden from SearchIPCRouter::Delegate: |
| 142 void OnInstantSupportDetermined(bool supports_instant) override; | 143 void OnInstantSupportDetermined(bool supports_instant) override; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 197 |
| 197 // Delegate for notifying our owner about the SearchTabHelper state. Not owned | 198 // Delegate for notifying our owner about the SearchTabHelper state. Not owned |
| 198 // by us. | 199 // by us. |
| 199 // NULL on iOS and Android because they don't use the Instant framework. | 200 // NULL on iOS and Android because they don't use the Instant framework. |
| 200 SearchTabHelperDelegate* delegate_; | 201 SearchTabHelperDelegate* delegate_; |
| 201 | 202 |
| 202 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 203 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 203 }; | 204 }; |
| 204 | 205 |
| 205 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 206 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |