Chromium Code Reviews| 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 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/printing/print_view_manager.h" | |
| 14 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
| 15 #include "content/browser/tab_contents/tab_contents_observer.h" | 16 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 16 #include "content/common/notification_registrar.h" | 17 #include "content/common/notification_registrar.h" |
| 17 | 18 |
| 18 namespace prerender { | 19 namespace prerender { |
| 19 class PrerenderObserver; | 20 class PrerenderObserver; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace printing { | 23 namespace printing { |
| 23 class PrintPreviewMessageHandler; | 24 class PrintPreviewMessageHandler; |
| 24 class PrintViewManager; | |
| 25 } | 25 } |
| 26 | 26 |
| 27 class AutocompleteHistoryManager; | 27 class AutocompleteHistoryManager; |
| 28 class AutofillManager; | 28 class AutofillManager; |
| 29 class DevToolsObserver; | 29 class DevToolsObserver; |
| 30 class Extension; | 30 class Extension; |
| 31 class ExtensionTabHelper; | 31 class ExtensionTabHelper; |
| 32 class FileSelectObserver; | 32 class FileSelectObserver; |
| 33 class FindTabHelper; | 33 class FindTabHelper; |
| 34 class NavigationController; | 34 class NavigationController; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 } | 103 } |
| 104 | 104 |
| 105 FindTabHelper* find_tab_helper() { return find_tab_helper_.get(); } | 105 FindTabHelper* find_tab_helper() { return find_tab_helper_.get(); } |
| 106 | 106 |
| 107 PasswordManager* password_manager() { return password_manager_.get(); } | 107 PasswordManager* password_manager() { return password_manager_.get(); } |
| 108 | 108 |
| 109 SearchEngineTabHelper* search_engine_tab_helper() { | 109 SearchEngineTabHelper* search_engine_tab_helper() { |
| 110 return search_engine_tab_helper_.get(); | 110 return search_engine_tab_helper_.get(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 printing::PrintViewManager* print_view_manager() { | |
| 114 return print_view_manager_.get(); | |
| 115 } | |
| 116 | |
| 113 // Overrides ----------------------------------------------------------------- | 117 // Overrides ----------------------------------------------------------------- |
| 114 | 118 |
| 115 // TabContentsObserver overrides: | 119 // TabContentsObserver overrides: |
| 116 virtual void DidNavigateMainFramePostCommit( | 120 virtual void DidNavigateMainFramePostCommit( |
| 117 const NavigationController::LoadCommittedDetails& details, | 121 const NavigationController::LoadCommittedDetails& details, |
| 118 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; | 122 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; |
| 119 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 123 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 120 | 124 |
| 121 // NotificationObserver overrides: | 125 // NotificationObserver overrides: |
| 122 virtual void Observe(NotificationType type, | 126 virtual void Observe(NotificationType type, |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 146 | 150 |
| 147 // Registers and unregisters us for notifications. | 151 // Registers and unregisters us for notifications. |
| 148 NotificationRegistrar registrar_; | 152 NotificationRegistrar registrar_; |
| 149 | 153 |
| 150 // Data for current page ----------------------------------------------------- | 154 // Data for current page ----------------------------------------------------- |
| 151 | 155 |
| 152 // Whether the current URL is starred. | 156 // Whether the current URL is starred. |
| 153 bool is_starred_; | 157 bool is_starred_; |
| 154 | 158 |
| 155 // Handles print job for this contents. | 159 // Handles print job for this contents. |
| 156 scoped_ptr<printing::PrintViewManager> printing_; | 160 scoped_ptr<printing::PrintViewManager> print_view_manager_; |
|
Avi (use Gerrit)
2011/04/06 11:21:32
If this is a Tab Helper, put it in the Tab Helper
Lei Zhang
2011/04/07 00:53:20
Done.
| |
| 157 | 161 |
| 158 // Handles Print Preview messages. | 162 // Handles Print Preview messages. |
| 159 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_; | 163 scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_; |
|
Avi (use Gerrit)
2011/04/06 11:21:32
No. This is a class that just sits there per-tab a
Lei Zhang
2011/04/07 00:53:20
Done.
| |
| 160 | 164 |
| 161 // Tab Helpers --------------------------------------------------------------- | 165 // Tab Helpers --------------------------------------------------------------- |
| 162 // (These provide API for callers and have a getter function listed in the | 166 // (These provide API for callers and have a getter function listed in the |
| 163 // "Tab Helpers" section in the member functions area, above.) | 167 // "Tab Helpers" section in the member functions area, above.) |
| 164 | 168 |
| 165 scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; | 169 scoped_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; |
| 166 | 170 |
| 167 scoped_ptr<AutofillManager> autofill_manager_; | 171 scoped_ptr<AutofillManager> autofill_manager_; |
| 168 | 172 |
| 169 scoped_ptr<ExtensionTabHelper> extension_tab_helper_; | 173 scoped_ptr<ExtensionTabHelper> extension_tab_helper_; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 189 | 193 |
| 190 // The supporting objects need to outlive the TabContents dtor (as they may | 194 // The supporting objects need to outlive the TabContents dtor (as they may |
| 191 // be called upon during its execution). As a result, this must come last | 195 // be called upon during its execution). As a result, this must come last |
| 192 // in the list. | 196 // in the list. |
| 193 scoped_ptr<TabContents> tab_contents_; | 197 scoped_ptr<TabContents> tab_contents_; |
| 194 | 198 |
| 195 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); | 199 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); |
| 196 }; | 200 }; |
| 197 | 201 |
| 198 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 202 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| OLD | NEW |