Lines Matching defs:loader
226 // TODO(sky): this shouldn't nuke the loader. It should just nuke non-instant
253 // If the loader was showing an instant page then it's navigation stack is
355 // Make sure the pending loader is active. Ideally we would call
359 InstantLoader* loader = loader_manager_->active_loader();
360 if (loader && loader->ready() &&
361 loader == loader_manager_->pending_loader()) {
367 // Loader may be null if the url blacklisted instant.
368 scoped_ptr<InstantLoader> loader;
370 loader.reset(loader_manager_->ReleaseCurrentLoader());
371 TabContentsWrapper* tab = loader.get() ?
372 loader->ReleasePreviewContents(type) : NULL;
409 void InstantController::InstantStatusChanged(InstantLoader* loader) {
410 if (!loader->http_status_ok()) {
421 ProcessInstantStatusChanged(loader);
425 InstantLoader* loader,
428 if (loader_manager_->current_loader() == loader)
440 void InstantController::CommitInstantLoader(InstantLoader* loader) {
441 if (loader_manager_.get() && loader_manager_->current_loader() == loader) {
452 InstantLoader* loader) {
453 DCHECK(!loader->ready()); // We better not be showing this loader.
454 DCHECK(loader->template_url_id());
459 BlacklistFromInstant(loader->template_url_id());
461 // Because of the state of the stack we can't destroy the loader now.
462 bool was_pending = loader_manager_->pending_loader() == loader;
463 ScheduleDestroy(loader_manager_->ReleaseLoader(loader));
465 // |loader| was the pending loader. We may be showing another TabContents to
469 // |loader| wasn't pending, yet it may still be the displayed loader.
474 void InstantController::AddToBlacklist(InstantLoader* loader, const GURL& url) {
486 // Because of the state of the stack we can't destroy the loader now.
487 ScheduleDestroy(loader);
489 loader_manager_->ReleaseLoader(loader);
495 InstantLoader* loader = NULL;
496 // As soon as the pending loader is displayable it becomes the current loader,
497 // so we need only concern ourselves with the current loader here.
502 loader = loader_manager_->current_loader();
504 if (loader == displayable_loader_)
507 displayable_loader_ = loader;
540 // from an instant to non-instant loader.
545 // WillUpateChangeActiveLoader should return true if no active loader, so
546 // we know there will be an active loader if we get here.
572 void InstantController::ProcessInstantStatusChanged(InstantLoader* loader) {
575 if (loader == loader_manager_->pending_loader()) {
577 } else if (loader != loader_manager_->current_loader()) {
578 // Notification from a loader that is no longer the current (either we have
579 // a pending, or its an instant loader). Ignore it.
590 InstantLoader* loader = loader_manager_->active_loader();
591 if (loader && loader->ready())
592 ProcessInstantStatusChanged(loader);
662 void InstantController::ScheduleDestroy(InstantLoader* loader) {
663 loaders_to_destroy_.push_back(loader);