OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "content/browser/tab_contents/tab_contents.h" | 12 #include "content/browser/tab_contents/tab_contents.h" |
13 #include "content/browser/tab_contents/tab_contents_observer.h" | 13 #include "content/browser/tab_contents/tab_contents_observer.h" |
14 #include "content/common/notification_registrar.h" | 14 #include "content/common/notification_registrar.h" |
15 | 15 |
16 namespace prerender { | 16 namespace prerender { |
17 class PrerenderObserver; | 17 class PrerenderObserver; |
18 } | 18 } |
19 | 19 |
20 class Extension; | 20 class Extension; |
| 21 class FileSelectObserver; |
21 class FindTabHelper; | 22 class FindTabHelper; |
22 class NavigationController; | 23 class NavigationController; |
23 class PasswordManager; | 24 class PasswordManager; |
24 class PasswordManagerDelegate; | 25 class PasswordManagerDelegate; |
25 class SearchEngineTabHelper; | 26 class SearchEngineTabHelper; |
26 class TabContentsWrapperDelegate; | 27 class TabContentsWrapperDelegate; |
27 | 28 |
28 // Wraps TabContents and all of its supporting objects in order to control | 29 // Wraps TabContents and all of its supporting objects in order to control |
29 // their ownership and lifetime, while allowing TabContents to remain generic | 30 // their ownership and lifetime, while allowing TabContents to remain generic |
30 // and re-usable in other projects. | 31 // and re-usable in other projects. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 128 |
128 // Registers and unregisters us for notifications. | 129 // Registers and unregisters us for notifications. |
129 NotificationRegistrar registrar_; | 130 NotificationRegistrar registrar_; |
130 | 131 |
131 // Data for current page ----------------------------------------------------- | 132 // Data for current page ----------------------------------------------------- |
132 | 133 |
133 // Whether the current URL is starred. | 134 // Whether the current URL is starred. |
134 bool is_starred_; | 135 bool is_starred_; |
135 | 136 |
136 // Tab Helpers --------------------------------------------------------------- | 137 // Tab Helpers --------------------------------------------------------------- |
| 138 // (These provide API for callers and have a getter function listed in the |
| 139 // "Tab Helpers" section in the member functions area, above.) |
137 | 140 |
138 scoped_ptr<FindTabHelper> find_tab_helper_; | 141 scoped_ptr<FindTabHelper> find_tab_helper_; |
139 | 142 |
140 // PasswordManager and its delegate. The delegate must outlive the manager, | 143 // PasswordManager and its delegate. The delegate must outlive the manager, |
141 // per documentation in password_manager.h. | 144 // per documentation in password_manager.h. |
142 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; | 145 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; |
143 scoped_ptr<PasswordManager> password_manager_; | 146 scoped_ptr<PasswordManager> password_manager_; |
144 | 147 |
| 148 scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_; |
| 149 |
| 150 // Per-tab observers --------------------------------------------------------- |
| 151 // (These provide no API for callers; objects that need to exist 1:1 with tabs |
| 152 // and silently do their thing live here.) |
| 153 |
| 154 scoped_ptr<FileSelectObserver> file_select_observer_; |
145 scoped_ptr<prerender::PrerenderObserver> prerender_observer_; | 155 scoped_ptr<prerender::PrerenderObserver> prerender_observer_; |
146 | 156 |
147 scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_; | |
148 | |
149 // TabContents (MUST BE LAST) ------------------------------------------------ | 157 // TabContents (MUST BE LAST) ------------------------------------------------ |
150 | 158 |
151 // The supporting objects need to outlive the TabContents dtor (as they may | 159 // The supporting objects need to outlive the TabContents dtor (as they may |
152 // be called upon during its execution). As a result, this must come last | 160 // be called upon during its execution). As a result, this must come last |
153 // in the list. | 161 // in the list. |
154 scoped_ptr<TabContents> tab_contents_; | 162 scoped_ptr<TabContents> tab_contents_; |
155 | 163 |
156 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); | 164 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); |
157 }; | 165 }; |
158 | 166 |
159 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 167 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
OLD | NEW |