| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/alternate_nav_url_fetcher.h" | 5 #include "chrome/browser/alternate_nav_url_fetcher.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" |
| 7 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 8 #include "chrome/browser/tab_contents/navigation_controller.h" | 9 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 9 #include "chrome/browser/tab_contents/navigation_entry.h" | 10 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
| 11 #include "chrome/common/l10n_util.h" | |
| 12 #include "chrome/common/notification_service.h" | 12 #include "chrome/common/notification_service.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 | 14 |
| 15 AlternateNavURLFetcher::AlternateNavURLFetcher( | 15 AlternateNavURLFetcher::AlternateNavURLFetcher( |
| 16 const GURL& alternate_nav_url) | 16 const GURL& alternate_nav_url) |
| 17 : LinkInfoBarDelegate(NULL), | 17 : LinkInfoBarDelegate(NULL), |
| 18 alternate_nav_url_(alternate_nav_url), | 18 alternate_nav_url_(alternate_nav_url), |
| 19 controller_(NULL), | 19 controller_(NULL), |
| 20 state_(NOT_STARTED), | 20 state_(NOT_STARTED), |
| 21 navigated_to_entry_(false), | 21 navigated_to_entry_(false), |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 void AlternateNavURLFetcher::ShowInfobarIfPossible() { | 117 void AlternateNavURLFetcher::ShowInfobarIfPossible() { |
| 118 if (!navigated_to_entry_ || state_ != SUCCEEDED) | 118 if (!navigated_to_entry_ || state_ != SUCCEEDED) |
| 119 return; | 119 return; |
| 120 | 120 |
| 121 infobar_contents_ = controller_->tab_contents(); | 121 infobar_contents_ = controller_->tab_contents(); |
| 122 StoreActiveEntryUniqueID(infobar_contents_); | 122 StoreActiveEntryUniqueID(infobar_contents_); |
| 123 // We will be deleted when the InfoBar is destroyed. (See InfoBarClosed). | 123 // We will be deleted when the InfoBar is destroyed. (See InfoBarClosed). |
| 124 infobar_contents_->AddInfoBar(this); | 124 infobar_contents_->AddInfoBar(this); |
| 125 } | 125 } |
| OLD | NEW |