| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Invoked by |instant_| to get the currently active tab, over which the | 61 // Invoked by |instant_| to get the currently active tab, over which the |
| 62 // preview would be shown. | 62 // preview would be shown. |
| 63 TabContents* GetActiveTabContents() const; | 63 TabContents* GetActiveTabContents() const; |
| 64 | 64 |
| 65 // Overridden from PrefObserver: | 65 // Overridden from PrefObserver: |
| 66 virtual void OnPreferenceChanged(PrefServiceBase* service, | 66 virtual void OnPreferenceChanged(PrefServiceBase* service, |
| 67 const std::string& pref_name) OVERRIDE; | 67 const std::string& pref_name) OVERRIDE; |
| 68 | 68 |
| 69 // Overridden from TabStripModelObserver: | 69 // Overridden from TabStripModelObserver: |
| 70 virtual void ActiveTabChanged(TabContents* old_contents, | 70 virtual void ActiveTabChanged(content::WebContents* old_contents, |
| 71 TabContents* new_contents, | 71 content::WebContents* new_contents, |
| 72 int index, | 72 int index, |
| 73 bool user_gesture) OVERRIDE; | 73 bool user_gesture) OVERRIDE; |
| 74 | 74 |
| 75 // Overridden from search::SearchModelObserver: | 75 // Overridden from search::SearchModelObserver: |
| 76 virtual void ModeChanged(const search::Mode& old_mode, | 76 virtual void ModeChanged(const search::Mode& old_mode, |
| 77 const search::Mode& new_mode) OVERRIDE; | 77 const search::Mode& new_mode) OVERRIDE; |
| 78 | 78 |
| 79 // If this browser should have Instant, a new InstantController created; | 79 // If this browser should have Instant, a new InstantController created; |
| 80 // otherwise any existing InstantController is destroyed. | 80 // otherwise any existing InstantController is destroyed. |
| 81 void ResetInstant(); | 81 void ResetInstant(); |
| 82 | 82 |
| 83 Browser* browser_; | 83 Browser* browser_; |
| 84 | 84 |
| 85 scoped_ptr<InstantController> instant_; | 85 scoped_ptr<InstantController> instant_; |
| 86 InstantUnloadHandler instant_unload_handler_; | 86 InstantUnloadHandler instant_unload_handler_; |
| 87 | 87 |
| 88 PrefChangeRegistrar profile_pref_registrar_; | 88 PrefChangeRegistrar profile_pref_registrar_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); | 90 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace chrome | 93 } // namespace chrome |
| 94 | 94 |
| 95 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 95 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
| OLD | NEW |