Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1930)

Unified Diff: chrome/browser/instant/instant_loader.cc

Issue 9018016: Revert r115276, it broke PanelDownloadTest.Download in interactive_ui_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_loader.cc
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index a04969ee58676cc7bc53bbd673c36f1652157ea5..cc09d018b3fd32e193f38f4b5ac07c0a06404bd9 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -96,8 +96,7 @@ class InstantLoader::FrameLoadObserver : public content::NotificationObserver {
tab_contents_(tab_contents),
text_(text),
verbatim_(verbatim),
- unique_id_(
- tab_contents_->GetController().pending_entry()->unique_id()) {
+ unique_id_(tab_contents_->controller().pending_entry()->unique_id()) {
registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
content::Source<TabContents>(tab_contents_));
}
@@ -142,7 +141,7 @@ void InstantLoader::FrameLoadObserver::Observe(
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: {
int page_id = *(content::Details<int>(details).ptr());
NavigationEntry* active_entry =
- tab_contents_->GetController().GetActiveEntry();
+ tab_contents_->controller().GetActiveEntry();
if (!active_entry || active_entry->page_id() != page_id ||
active_entry->unique_id() != unique_id_) {
return;
@@ -291,7 +290,7 @@ InstantLoader::TabContentsDelegateImpl::TabContentsDelegateImpl(
content::Source<TabContents>(loader->preview_contents()->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
content::Source<NavigationController>(
- &loader->preview_contents()->tab_contents()->GetController()));
+ &loader->preview_contents()->tab_contents()->controller()));
}
void InstantLoader::TabContentsDelegateImpl::PrepareForNewLoad() {
@@ -332,7 +331,7 @@ void InstantLoader::TabContentsDelegateImpl::CommitHistory(
}
NavigationEntry* active_entry =
- tab->tab_contents()->GetController().GetActiveEntry();
+ tab->tab_contents()->controller().GetActiveEntry();
if (!active_entry) {
// It appears to be possible to get here with no active entry. This seems
// to be possible with an auth dialog, but I can't narrow down the
@@ -425,7 +424,7 @@ void InstantLoader::TabContentsDelegateImpl::NavigationStateChanged(
const TabContents* source,
unsigned changed_flags) {
if (!loader_->ready() && !registered_render_widget_host_ &&
- source->GetController().entry_count()) {
+ source->controller().entry_count()) {
// The load has been committed. Install an observer that waits for the
// first paint then makes the preview active. We wait for the load to be
// committed before waiting on paint as there is always an initial paint
@@ -548,9 +547,9 @@ void InstantLoader::TabContentsDelegateImpl::OnSetSuggestions(
const std::vector<std::string>& suggestions,
InstantCompleteBehavior behavior) {
TabContentsWrapper* source = loader_->preview_contents();
- if (!source->tab_contents()->GetController().GetActiveEntry() ||
+ if (!source->tab_contents()->controller().GetActiveEntry() ||
page_id !=
- source->tab_contents()->GetController().GetActiveEntry()->page_id()) {
+ source->tab_contents()->controller().GetActiveEntry()->page_id()) {
return;
}
@@ -564,8 +563,8 @@ void InstantLoader::TabContentsDelegateImpl::OnInstantSupportDetermined(
int32 page_id,
bool result) {
TabContents* source = loader_->preview_contents()->tab_contents();
- if (!source->GetController().GetActiveEntry() ||
- page_id != source->GetController().GetActiveEntry()->page_id())
+ if (!source->controller().GetActiveEntry() ||
+ page_id != source->controller().GetActiveEntry()->page_id())
return;
content::Details<const bool> details(&result);
@@ -694,7 +693,7 @@ bool InstantLoader::Update(TabContentsWrapper* tab_contents,
DCHECK(template_url_id_ == 0);
preview_tab_contents_delegate_->PrepareForNewLoad();
frame_load_observer_.reset(NULL);
- preview_contents_->tab_contents()->GetController().LoadURL(
+ preview_contents_->tab_contents()->controller().LoadURL(
url_, content::Referrer(), transition_type, std::string());
}
return true;
@@ -775,7 +774,7 @@ TabContentsWrapper* InstantLoader::ReleasePreviewContents(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
content::Source<NavigationController>(
- &preview_contents_->tab_contents()->GetController()));
+ &preview_contents_->tab_contents()->controller()));
#endif
}
preview_contents_->tab_contents()->SetDelegate(NULL);
@@ -812,7 +811,7 @@ void InstantLoader::MaybeLoadInstantURL(TabContentsWrapper* tab_contents,
bool InstantLoader::IsNavigationPending() const {
return preview_contents_.get() &&
- preview_contents_->tab_contents()->GetController().pending_entry();
+ preview_contents_->tab_contents()->controller().pending_entry();
}
void InstantLoader::Observe(int type,
@@ -995,13 +994,13 @@ void InstantLoader::ReplacePreviewContents(TabContentsWrapper* old_tc,
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
content::Source<NavigationController>(
- &old_tc->tab_contents()->GetController()));
+ &old_tc->tab_contents()->controller()));
#endif
registrar_.Remove(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &old_tc->tab_contents()->GetController()));
+ &old_tc->tab_contents()->controller()));
// We prerendered so we should be ready to show. If we're ready, swap in
// immediately, otherwise show the preview as normal.
@@ -1025,7 +1024,7 @@ void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
// will overlap.
int32 max_page_id = tab_contents->tab_contents()->GetMaxPageID();
if (max_page_id != -1) {
- preview_contents_->tab_contents()->GetController().set_max_restored_page_id(
+ preview_contents_->tab_contents()->controller().set_max_restored_page_id(
max_page_id + 1);
}
@@ -1041,14 +1040,14 @@ void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
content::Source<NavigationController>(
- &preview_contents_->tab_contents()->GetController()));
+ &preview_contents_->tab_contents()->controller()));
#endif
registrar_.Add(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &preview_contents_->tab_contents()->GetController()));
+ &preview_contents_->tab_contents()->controller()));
gfx::Rect tab_bounds;
tab_contents->tab_contents()->GetView()->GetContainerBounds(&tab_bounds);
@@ -1087,7 +1086,7 @@ void InstantLoader::LoadInstantURL(TabContentsWrapper* tab_contents,
CommandLine* cl = CommandLine::ForCurrentProcess();
if (cl->HasSwitch(switches::kInstantURL))
instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL));
- preview_contents_->tab_contents()->GetController().LoadURL(
+ preview_contents_->tab_contents()->controller().LoadURL(
instant_url, content::Referrer(), transition_type, std::string());
RenderViewHost* host = preview_contents_->tab_contents()->GetRenderViewHost();
preview_contents_->tab_contents()->HideContents();
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698