Index: chrome/browser/ui/tab_contents/core_tab_helper.cc |
=================================================================== |
--- chrome/browser/ui/tab_contents/core_tab_helper.cc (revision 115777) |
+++ chrome/browser/ui/tab_contents/core_tab_helper.cc (working copy) |
@@ -7,14 +7,16 @@ |
#include "chrome/browser/renderer_host/web_cache_manager.h" |
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
#include "content/browser/renderer_host/render_view_host.h" |
-#include "content/browser/tab_contents/tab_contents.h" |
+#include "content/public/browser/render_process_host.h" |
+#include "content/public/browser/web_contents.h" |
#include "grit/generated_resources.h" |
#include "ui/base/l10n/l10n_util.h" |
-CoreTabHelper::CoreTabHelper(TabContentsWrapper* wrapper) |
- : content::WebContentsObserver(wrapper->tab_contents()), |
- delegate_(NULL), |
- wrapper_(wrapper) { |
+using content::WebContents; |
+ |
+CoreTabHelper::CoreTabHelper(WebContents* web_contents) |
+ : content::WebContentsObserver(web_contents), |
+ delegate_(NULL) { |
} |
CoreTabHelper::~CoreTabHelper() { |
@@ -25,15 +27,15 @@ |
} |
string16 CoreTabHelper::GetStatusText() const { |
- if (!tab_contents()->IsLoading() || |
- tab_contents()->GetLoadState().state == net::LOAD_STATE_IDLE) { |
+ if (!web_contents()->IsLoading() || |
+ web_contents()->GetLoadState().state == net::LOAD_STATE_IDLE) { |
return string16(); |
} |
- switch (tab_contents()->GetLoadState().state) { |
+ switch (web_contents()->GetLoadState().state) { |
case net::LOAD_STATE_WAITING_FOR_DELEGATE: |
return l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_DELEGATE, |
- tab_contents()->GetLoadState().param); |
+ web_contents()->GetLoadState().param); |
case net::LOAD_STATE_WAITING_FOR_CACHE: |
return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_CACHE); |
case net::LOAD_STATE_WAITING_FOR_APPCACHE: |
@@ -53,17 +55,17 @@ |
case net::LOAD_STATE_SSL_HANDSHAKE: |
return l10n_util::GetStringUTF16(IDS_LOAD_STATE_SSL_HANDSHAKE); |
case net::LOAD_STATE_SENDING_REQUEST: |
- if (tab_contents()->GetUploadSize()) { |
+ if (web_contents()->GetUploadSize()) { |
return l10n_util::GetStringFUTF16Int( |
IDS_LOAD_STATE_SENDING_REQUEST_WITH_PROGRESS, |
- static_cast<int>((100 * tab_contents()->GetUploadPosition()) / |
- tab_contents()->GetUploadSize())); |
+ static_cast<int>((100 * web_contents()->GetUploadPosition()) / |
+ web_contents()->GetUploadSize())); |
} else { |
return l10n_util::GetStringUTF16(IDS_LOAD_STATE_SENDING_REQUEST); |
} |
case net::LOAD_STATE_WAITING_FOR_RESPONSE: |
return l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_RESPONSE, |
- tab_contents()->GetLoadStateHost()); |
+ web_contents()->GetLoadStateHost()); |
// Ignore net::LOAD_STATE_READING_RESPONSE and net::LOAD_STATE_IDLE |
case net::LOAD_STATE_IDLE: |
case net::LOAD_STATE_READING_RESPONSE: |
@@ -78,5 +80,5 @@ |
void CoreTabHelper::DidBecomeSelected() { |
WebCacheManager::GetInstance()->ObserveActivity( |
- tab_contents()->GetRenderProcessHost()->GetID()); |
+ web_contents()->GetRenderProcessHost()->GetID()); |
} |