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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/instant/instant_controller_delegate.h" | 9 #include "chrome/browser/instant/instant_controller_delegate.h" |
10 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Commits the current instant, returning true on success. This is intended | 29 // Commits the current instant, returning true on success. This is intended |
30 // for use from OpenCurrentURL. | 30 // for use from OpenCurrentURL. |
31 bool OpenInstant(WindowOpenDisposition disposition); | 31 bool OpenInstant(WindowOpenDisposition disposition); |
32 | 32 |
33 // Returns the InstantController or NULL if there is no InstantController for | 33 // Returns the InstantController or NULL if there is no InstantController for |
34 // this BrowserInstantController. | 34 // this BrowserInstantController. |
35 InstantController* instant() const { return instant_.get(); } | 35 InstantController* instant() const { return instant_.get(); } |
36 | 36 |
37 private: | 37 private: |
38 // Overridden from InstantControllerDelegate: | 38 // Overridden from InstantControllerDelegate: |
39 virtual void ShowInstant(TabContents* preview_contents) OVERRIDE; | 39 virtual void ShowInstant() OVERRIDE; |
40 virtual void HideInstant() OVERRIDE; | 40 virtual void HideInstant() OVERRIDE; |
41 virtual void CommitInstant(TabContents* preview_contents) OVERRIDE; | 41 virtual void CommitInstant(TabContents* preview_contents) OVERRIDE; |
42 virtual void SetSuggestedText(const string16& text, | 42 virtual void SetSuggestedText(const string16& text, |
43 InstantCompleteBehavior behavior) OVERRIDE; | 43 InstantCompleteBehavior behavior) OVERRIDE; |
44 virtual gfx::Rect GetInstantBounds() OVERRIDE; | 44 virtual gfx::Rect GetInstantBounds() OVERRIDE; |
45 virtual void InstantPreviewFocused() OVERRIDE; | 45 virtual void InstantPreviewFocused() OVERRIDE; |
46 virtual TabContents* GetInstantHostTabContents() const OVERRIDE; | 46 virtual TabContents* GetInstantHostTabContents() const OVERRIDE; |
47 | 47 |
48 // Overridden from content::NotificationObserver: | 48 // Overridden from content::NotificationObserver: |
49 virtual void Observe(int type, | 49 virtual void Observe(int type, |
(...skipping 12 matching lines...) Expand all Loading... |
62 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 62 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
63 | 63 |
64 PrefChangeRegistrar profile_pref_registrar_; | 64 PrefChangeRegistrar profile_pref_registrar_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); | 66 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace chrome | 69 } // namespace chrome |
70 | 70 |
71 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 71 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
OLD | NEW |