| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class BlockedContentTabHelper; | 31 class BlockedContentTabHelper; |
| 32 class BookmarkTabHelper; | 32 class BookmarkTabHelper; |
| 33 class DownloadTabHelper; | 33 class DownloadTabHelper; |
| 34 class Extension; | 34 class Extension; |
| 35 class ExtensionTabHelper; | 35 class ExtensionTabHelper; |
| 36 class ExtensionWebNavigationTabObserver; | 36 class ExtensionWebNavigationTabObserver; |
| 37 class FaviconTabHelper; | 37 class FaviconTabHelper; |
| 38 class FileSelectObserver; | 38 class FileSelectObserver; |
| 39 class FindTabHelper; | 39 class FindTabHelper; |
| 40 class InfoBarDelegate; | 40 class InfoBarDelegate; |
| 41 class HistoryTabHelper; |
| 41 class NavigationController; | 42 class NavigationController; |
| 42 class OmniboxSearchHint; | 43 class OmniboxSearchHint; |
| 43 class PasswordManager; | 44 class PasswordManager; |
| 44 class PasswordManagerDelegate; | 45 class PasswordManagerDelegate; |
| 45 class PluginObserver; | 46 class PluginObserver; |
| 46 class SearchEngineTabHelper; | 47 class SearchEngineTabHelper; |
| 47 class TabContentsSSLHelper; | 48 class TabContentsSSLHelper; |
| 48 class TabContentsWrapperDelegate; | 49 class TabContentsWrapperDelegate; |
| 49 class TabSpecificContentSettings; | 50 class TabSpecificContentSettings; |
| 50 class ThumbnailGenerator; | 51 class ThumbnailGenerator; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return download_tab_helper_.get(); | 135 return download_tab_helper_.get(); |
| 135 } | 136 } |
| 136 | 137 |
| 137 ExtensionTabHelper* extension_tab_helper() { | 138 ExtensionTabHelper* extension_tab_helper() { |
| 138 return extension_tab_helper_.get(); | 139 return extension_tab_helper_.get(); |
| 139 } | 140 } |
| 140 | 141 |
| 141 FindTabHelper* find_tab_helper() { return find_tab_helper_.get(); } | 142 FindTabHelper* find_tab_helper() { return find_tab_helper_.get(); } |
| 142 | 143 |
| 143 FaviconTabHelper* favicon_tab_helper() { return favicon_tab_helper_.get(); } | 144 FaviconTabHelper* favicon_tab_helper() { return favicon_tab_helper_.get(); } |
| 144 | 145 HistoryTabHelper* history_tab_helper() { return history_tab_helper_.get(); } |
| 145 PasswordManager* password_manager() { return password_manager_.get(); } | 146 PasswordManager* password_manager() { return password_manager_.get(); } |
| 146 | 147 |
| 147 printing::PrintViewManager* print_view_manager() { | 148 printing::PrintViewManager* print_view_manager() { |
| 148 return print_view_manager_.get(); | 149 return print_view_manager_.get(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() { | 152 safe_browsing::ClientSideDetectionHost* safebrowsing_detection_host() { |
| 152 return safebrowsing_detection_host_.get(); | 153 return safebrowsing_detection_host_.get(); |
| 153 } | 154 } |
| 154 | 155 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 void set_infobars_enabled(bool value) { infobars_enabled_ = value; } | 195 void set_infobars_enabled(bool value) { infobars_enabled_ = value; } |
| 195 // WARNING: This does not sanity-check |index|! | 196 // WARNING: This does not sanity-check |index|! |
| 196 InfoBarDelegate* GetInfoBarDelegateAt(size_t index) { | 197 InfoBarDelegate* GetInfoBarDelegateAt(size_t index) { |
| 197 return infobar_delegates_[index]; | 198 return infobar_delegates_[index]; |
| 198 } | 199 } |
| 199 | 200 |
| 200 private: | 201 private: |
| 201 // Internal helpers ---------------------------------------------------------- | 202 // Internal helpers ---------------------------------------------------------- |
| 202 | 203 |
| 203 // Message handlers. | 204 // Message handlers. |
| 204 void OnPageContents(const GURL& url, | |
| 205 int32 page_id, | |
| 206 const string16& contents); | |
| 207 void OnJSOutOfMemory(); | 205 void OnJSOutOfMemory(); |
| 208 void OnRegisterProtocolHandler(const std::string& protocol, | 206 void OnRegisterProtocolHandler(const std::string& protocol, |
| 209 const GURL& url, | 207 const GURL& url, |
| 210 const string16& title); | 208 const string16& title); |
| 211 void OnThumbnail(const GURL& url, | |
| 212 const ThumbnailScore& score, | |
| 213 const SkBitmap& bitmap); | |
| 214 void OnSnapshot(const SkBitmap& bitmap); | 209 void OnSnapshot(const SkBitmap& bitmap); |
| 215 void OnPDFHasUnsupportedFeature(); | 210 void OnPDFHasUnsupportedFeature(); |
| 216 | 211 |
| 217 // Data for core operation --------------------------------------------------- | 212 // Data for core operation --------------------------------------------------- |
| 218 | 213 |
| 219 // Delegate for notifying our owner about stuff. Not owned by us. | 214 // Delegate for notifying our owner about stuff. Not owned by us. |
| 220 TabContentsWrapperDelegate* delegate_; | 215 TabContentsWrapperDelegate* delegate_; |
| 221 | 216 |
| 222 // Delegates for InfoBars associated with this TabContentsWrapper. | 217 // Delegates for InfoBars associated with this TabContentsWrapper. |
| 223 std::vector<InfoBarDelegate*> infobar_delegates_; | 218 std::vector<InfoBarDelegate*> infobar_delegates_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 237 | 232 |
| 238 scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; | 233 scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; |
| 239 scoped_ptr<AutofillManager> autofill_manager_; | 234 scoped_ptr<AutofillManager> autofill_manager_; |
| 240 scoped_ptr<AutomationTabHelper> automation_tab_helper_; | 235 scoped_ptr<AutomationTabHelper> automation_tab_helper_; |
| 241 scoped_ptr<BlockedContentTabHelper> blocked_content_tab_helper_; | 236 scoped_ptr<BlockedContentTabHelper> blocked_content_tab_helper_; |
| 242 scoped_ptr<BookmarkTabHelper> bookmark_tab_helper_; | 237 scoped_ptr<BookmarkTabHelper> bookmark_tab_helper_; |
| 243 scoped_ptr<DownloadTabHelper> download_tab_helper_; | 238 scoped_ptr<DownloadTabHelper> download_tab_helper_; |
| 244 scoped_ptr<ExtensionTabHelper> extension_tab_helper_; | 239 scoped_ptr<ExtensionTabHelper> extension_tab_helper_; |
| 245 scoped_ptr<FaviconTabHelper> favicon_tab_helper_; | 240 scoped_ptr<FaviconTabHelper> favicon_tab_helper_; |
| 246 scoped_ptr<FindTabHelper> find_tab_helper_; | 241 scoped_ptr<FindTabHelper> find_tab_helper_; |
| 242 scoped_ptr<HistoryTabHelper> history_tab_helper_; |
| 247 | 243 |
| 248 // PasswordManager and its delegate. The delegate must outlive the manager, | 244 // PasswordManager and its delegate. The delegate must outlive the manager, |
| 249 // per documentation in password_manager.h. | 245 // per documentation in password_manager.h. |
| 250 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; | 246 scoped_ptr<PasswordManagerDelegate> password_manager_delegate_; |
| 251 scoped_ptr<PasswordManager> password_manager_; | 247 scoped_ptr<PasswordManager> password_manager_; |
| 252 | 248 |
| 253 // Handles print job for this contents. | 249 // Handles print job for this contents. |
| 254 scoped_ptr<printing::PrintViewManager> print_view_manager_; | 250 scoped_ptr<printing::PrintViewManager> print_view_manager_; |
| 255 | 251 |
| 256 // Handles IPCs related to SafeBrowsing client-side phishing detection. | 252 // Handles IPCs related to SafeBrowsing client-side phishing detection. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 281 | 277 |
| 282 // The supporting objects need to outlive the TabContents dtor (as they may | 278 // The supporting objects need to outlive the TabContents dtor (as they may |
| 283 // be called upon during its execution). As a result, this must come last | 279 // be called upon during its execution). As a result, this must come last |
| 284 // in the list. | 280 // in the list. |
| 285 scoped_ptr<TabContents> tab_contents_; | 281 scoped_ptr<TabContents> tab_contents_; |
| 286 | 282 |
| 287 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); | 283 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); |
| 288 }; | 284 }; |
| 289 | 285 |
| 290 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 286 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| OLD | NEW |