OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/omnibox/alternate_nav_url_fetcher.h" |
6 | 6 |
7 #include "chrome/browser/api/infobars/infobar_service.h" | 7 #include "chrome/browser/api/infobars/infobar_service.h" |
8 #include "chrome/browser/infobars/alternate_nav_infobar_delegate.h" | |
9 #include "chrome/browser/intranet_redirect_detector.h" | 8 #include "chrome/browser/intranet_redirect_detector.h" |
10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" |
11 #include "chrome/common/chrome_notification_types.h" | 11 #include "chrome/common/chrome_notification_types.h" |
12 #include "content/public/browser/navigation_controller.h" | 12 #include "content/public/browser/navigation_controller.h" |
13 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
14 #include "content/public/browser/render_process_host.h" | 14 #include "content/public/browser/render_process_host.h" |
15 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "net/base/load_flags.h" | 17 #include "net/base/load_flags.h" |
18 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 18 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
19 #include "net/url_request/url_fetcher.h" | 19 #include "net/url_request/url_fetcher.h" |
20 #include "net/url_request/url_request.h" | 20 #include "net/url_request/url_request.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 void AlternateNavURLFetcher::ShowInfobarIfPossible() { | 143 void AlternateNavURLFetcher::ShowInfobarIfPossible() { |
144 if (navigated_to_entry_ && (state_ == SUCCEEDED)) { | 144 if (navigated_to_entry_ && (state_ == SUCCEEDED)) { |
145 AlternateNavInfoBarDelegate::Create( | 145 AlternateNavInfoBarDelegate::Create( |
146 InfoBarService::FromWebContents(controller_->GetWebContents()), | 146 InfoBarService::FromWebContents(controller_->GetWebContents()), |
147 alternate_nav_url_); | 147 alternate_nav_url_); |
148 } else if (state_ != FAILED) { | 148 } else if (state_ != FAILED) { |
149 return; | 149 return; |
150 } | 150 } |
151 delete this; | 151 delete this; |
152 } | 152 } |
OLD | NEW |