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_BROWSER_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 // Invoked by |instant_| to get the currently active tab. | 41 // Invoked by |instant_| to get the currently active tab. |
42 content::WebContents* GetActiveWebContents() const; | 42 content::WebContents* GetActiveWebContents() const; |
43 | 43 |
44 // Invoked by |browser_| when the active tab changes. | 44 // Invoked by |browser_| when the active tab changes. |
45 void ActiveTabChanged(); | 45 void ActiveTabChanged(); |
46 | 46 |
47 // Invoked by |browser_| when the active tab is about to be deactivated. | 47 // Invoked by |browser_| when the active tab is about to be deactivated. |
48 void TabDeactivated(content::WebContents* contents); | 48 void TabDeactivated(content::WebContents* contents); |
49 | 49 |
50 private: | 50 private: |
51 // Overridden from search::SearchModelObserver: | 51 // SearchModelObserver: |
52 virtual void ModelChanged(const SearchModel::State& old_state, | 52 virtual void ModelChanged(const SearchModel::State& old_state, |
53 const SearchModel::State& new_state) OVERRIDE; | 53 const SearchModel::State& new_state) OVERRIDE; |
54 | 54 |
55 // Overridden from InstantServiceObserver: | 55 // InstantServiceObserver: |
56 virtual void DefaultSearchProviderChanged() OVERRIDE; | 56 virtual void DefaultSearchProviderChanged() OVERRIDE; |
57 virtual void GoogleURLUpdated() OVERRIDE; | |
58 | |
59 // Reloads the tabs in instant process to ensure that their privileged status | |
Jered
2014/05/08 20:20:05
This comment is useful because it describes why we
erikwright (departed)
2014/05/08 20:52:59
Done.
| |
60 // is still valid. | |
61 void ReloadTabsInInstantProcess(); | |
62 | 57 |
63 // Replaces the contents at tab |index| with |new_contents| and deletes the | 58 // Replaces the contents at tab |index| with |new_contents| and deletes the |
64 // existing contents. | 59 // existing contents. |
65 void ReplaceWebContentsAt(int index, | 60 void ReplaceWebContentsAt(int index, |
66 scoped_ptr<content::WebContents> new_contents); | 61 scoped_ptr<content::WebContents> new_contents); |
67 | 62 |
68 Browser* const browser_; | 63 Browser* const browser_; |
69 | 64 |
70 InstantController instant_; | 65 InstantController instant_; |
71 | 66 |
72 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); | 67 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
73 }; | 68 }; |
74 | 69 |
75 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 70 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
OLD | NEW |