| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/infobars/infobar_service.h" | 5 #include "chrome/browser/infobars/infobar_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "components/content_settings/content/common/content_settings_messages.h
" | |
| 11 #include "components/infobars/core/infobar.h" | 10 #include "components/infobars/core/infobar.h" |
| 12 #include "content/public/browser/navigation_details.h" | 11 #include "content/public/browser/navigation_details.h" |
| 13 #include "content/public/browser/navigation_entry.h" | 12 #include "content/public/browser/navigation_entry.h" |
| 14 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 15 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 16 #include "ui/base/page_transition_types.h" | 15 #include "ui/base/page_transition_types.h" |
| 17 | 16 |
| 18 | 17 |
| 19 DEFINE_WEB_CONTENTS_USER_DATA_KEY(InfoBarService); | 18 DEFINE_WEB_CONTENTS_USER_DATA_KEY(InfoBarService); |
| 20 | 19 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // A normal user click on an infobar URL will result in a CURRENT_TAB | 118 // A normal user click on an infobar URL will result in a CURRENT_TAB |
| 120 // disposition; turn that into a NEW_FOREGROUND_TAB so that we don't end up | 119 // disposition; turn that into a NEW_FOREGROUND_TAB so that we don't end up |
| 121 // smashing the page the user is looking at. | 120 // smashing the page the user is looking at. |
| 122 web_contents()->OpenURL( | 121 web_contents()->OpenURL( |
| 123 content::OpenURLParams(url, content::Referrer(), | 122 content::OpenURLParams(url, content::Referrer(), |
| 124 (disposition == WindowOpenDisposition::CURRENT_TAB) | 123 (disposition == WindowOpenDisposition::CURRENT_TAB) |
| 125 ? WindowOpenDisposition::NEW_FOREGROUND_TAB | 124 ? WindowOpenDisposition::NEW_FOREGROUND_TAB |
| 126 : disposition, | 125 : disposition, |
| 127 ui::PAGE_TRANSITION_LINK, false)); | 126 ui::PAGE_TRANSITION_LINK, false)); |
| 128 } | 127 } |
| OLD | NEW |