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 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "chrome/browser/prefs/pref_change_registrar.h" | |
| 15 #include "chrome/browser/printing/print_view_manager.h" | 16 #include "chrome/browser/printing/print_view_manager.h" |
| 16 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
| 17 #include "content/browser/tab_contents/tab_contents_observer.h" | 18 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 18 #include "content/common/notification_registrar.h" | 19 #include "content/common/notification_registrar.h" |
| 19 | 20 |
| 20 namespace prerender { | 21 namespace prerender { |
| 21 class PrerenderObserver; | 22 class PrerenderObserver; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace printing { | 25 namespace printing { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 return translate_tab_helper_.get(); | 168 return translate_tab_helper_.get(); |
| 168 } | 169 } |
| 169 | 170 |
| 170 prerender::PrerenderObserver* prerender_observer() { | 171 prerender::PrerenderObserver* prerender_observer() { |
| 171 return prerender_observer_.get(); | 172 return prerender_observer_.get(); |
| 172 } | 173 } |
| 173 | 174 |
| 174 // Overrides ----------------------------------------------------------------- | 175 // Overrides ----------------------------------------------------------------- |
| 175 | 176 |
| 176 // TabContentsObserver overrides: | 177 // TabContentsObserver overrides: |
| 178 virtual void RenderViewCreated(RenderViewHost* render_view_host); | |
|
Avi (use Gerrit)
2011/05/25 02:34:34
OVERRIDE
jam
2011/05/25 16:00:59
Done.
| |
| 177 virtual void RenderViewGone() OVERRIDE; | 179 virtual void RenderViewGone() OVERRIDE; |
| 178 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 180 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 179 | 181 |
| 180 // NotificationObserver overrides: | 182 // NotificationObserver overrides: |
| 181 virtual void Observe(NotificationType type, | 183 virtual void Observe(NotificationType type, |
| 182 const NotificationSource& source, | 184 const NotificationSource& source, |
| 183 const NotificationDetails& details) OVERRIDE; | 185 const NotificationDetails& details) OVERRIDE; |
| 184 | 186 |
| 185 // Infobars ------------------------------------------------------------------ | 187 // Infobars ------------------------------------------------------------------ |
| 186 | 188 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 206 // Internal helpers ---------------------------------------------------------- | 208 // Internal helpers ---------------------------------------------------------- |
| 207 | 209 |
| 208 // Message handlers. | 210 // Message handlers. |
| 209 void OnJSOutOfMemory(); | 211 void OnJSOutOfMemory(); |
| 210 void OnRegisterProtocolHandler(const std::string& protocol, | 212 void OnRegisterProtocolHandler(const std::string& protocol, |
| 211 const GURL& url, | 213 const GURL& url, |
| 212 const string16& title); | 214 const string16& title); |
| 213 void OnSnapshot(const SkBitmap& bitmap); | 215 void OnSnapshot(const SkBitmap& bitmap); |
| 214 void OnPDFHasUnsupportedFeature(); | 216 void OnPDFHasUnsupportedFeature(); |
| 215 | 217 |
| 218 // Returns the server that can provide alternate error pages. If the returned | |
| 219 // URL is empty, the default error page built into WebKit will be used. | |
| 220 GURL GetAlternateErrorPageURL() const; | |
| 221 | |
| 222 // Send the alternate error page URL to the renderer. This method is virtual | |
| 223 // so special html pages can override this (e.g., the new tab page). | |
|
Avi (use Gerrit)
2011/05/25 02:34:34
html → HTML
This doesn't look virtual to me. What
jam
2011/05/25 16:00:59
I had copied the comment without reading it till t
| |
| 224 void UpdateAlternateErrorPageURL(RenderViewHost* rvh); | |
| 225 | |
| 226 // Update the RenderView's WebPreferences. | |
| 227 void UpdateWebPreferences(); | |
| 228 | |
| 229 // Update the TabContents's RendererPreferences. | |
| 230 void UpdateRendererPreferences(); | |
| 231 | |
| 216 // Data for core operation --------------------------------------------------- | 232 // Data for core operation --------------------------------------------------- |
| 217 | 233 |
| 218 // Delegate for notifying our owner about stuff. Not owned by us. | 234 // Delegate for notifying our owner about stuff. Not owned by us. |
| 219 TabContentsWrapperDelegate* delegate_; | 235 TabContentsWrapperDelegate* delegate_; |
| 220 | 236 |
| 221 // Delegates for InfoBars associated with this TabContentsWrapper. | 237 // Delegates for InfoBars associated with this TabContentsWrapper. |
| 222 std::vector<InfoBarDelegate*> infobar_delegates_; | 238 std::vector<InfoBarDelegate*> infobar_delegates_; |
| 223 bool infobars_enabled_; | 239 bool infobars_enabled_; |
| 224 | 240 |
| 225 NotificationRegistrar registrar_; | 241 NotificationRegistrar registrar_; |
| 242 PrefChangeRegistrar pref_change_registrar_; | |
| 226 | 243 |
| 227 // Data for current page ----------------------------------------------------- | 244 // Data for current page ----------------------------------------------------- |
| 228 | 245 |
| 229 // Shows an info-bar to users when they search from a known search engine and | 246 // Shows an info-bar to users when they search from a known search engine and |
| 230 // have never used the omnibox for search before. | 247 // have never used the omnibox for search before. |
| 231 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; | 248 scoped_ptr<OmniboxSearchHint> omnibox_search_hint_; |
| 232 | 249 |
| 233 // Tab Helpers --------------------------------------------------------------- | 250 // Tab Helpers --------------------------------------------------------------- |
| 234 // (These provide API for callers and have a getter function listed in the | 251 // (These provide API for callers and have a getter function listed in the |
| 235 // "Tab Helpers" section in the member functions area, above.) | 252 // "Tab Helpers" section in the member functions area, above.) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 | 298 |
| 282 // The supporting objects need to outlive the TabContents dtor (as they may | 299 // 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 | 300 // be called upon during its execution). As a result, this must come last |
| 284 // in the list. | 301 // in the list. |
| 285 scoped_ptr<TabContents> tab_contents_; | 302 scoped_ptr<TabContents> tab_contents_; |
| 286 | 303 |
| 287 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); | 304 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapper); |
| 288 }; | 305 }; |
| 289 | 306 |
| 290 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ | 307 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_H_ |
| OLD | NEW |