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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/ui/search/search_model.h" | 10 #include "chrome/browser/ui/search/search_model.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual ~SearchTabHelper(); | 26 virtual ~SearchTabHelper(); |
27 | 27 |
28 SearchModel* model() { | 28 SearchModel* model() { |
29 return &model_; | 29 return &model_; |
30 } | 30 } |
31 | 31 |
32 // Invoked when the OmniboxEditModel changes state in some way that might | 32 // Invoked when the OmniboxEditModel changes state in some way that might |
33 // affect the search mode. | 33 // affect the search mode. |
34 void OmniboxEditModelChanged(bool user_input_in_progress, bool cancelling); | 34 void OmniboxEditModelChanged(bool user_input_in_progress, bool cancelling); |
35 | 35 |
| 36 // Invoked when the tab is being redirected from the online page to the |
| 37 // local fallback page. At this time we reset our state to prepare for the |
| 38 // new loading events. |
| 39 void RedirectingToLocal(); |
| 40 |
36 // Invoked when the active navigation entry is updated in some way that might | 41 // Invoked when the active navigation entry is updated in some way that might |
37 // affect the search mode. This is used by Instant when it "fixes up" the | 42 // affect the search mode. This is used by Instant when it "fixes up" the |
38 // virtual URL of the active entry. Regular navigations are captured through | 43 // virtual URL of the active entry. Regular navigations are captured through |
39 // the notification system and shouldn't call this method. | 44 // the notification system and shouldn't call this method. |
40 void NavigationEntryUpdated(); | 45 void NavigationEntryUpdated(); |
41 | 46 |
42 private: | 47 private: |
43 friend class content::WebContentsUserData<SearchTabHelper>; | 48 friend class content::WebContentsUserData<SearchTabHelper>; |
44 | 49 |
45 explicit SearchTabHelper(content::WebContents* web_contents); | 50 explicit SearchTabHelper(content::WebContents* web_contents); |
(...skipping 23 matching lines...) Expand all Loading... |
69 SearchModel model_; | 74 SearchModel model_; |
70 | 75 |
71 content::NotificationRegistrar registrar_; | 76 content::NotificationRegistrar registrar_; |
72 | 77 |
73 content::WebContents* web_contents_; | 78 content::WebContents* web_contents_; |
74 | 79 |
75 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 80 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
76 }; | 81 }; |
77 | 82 |
78 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 83 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
OLD | NEW |