| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/geolocation/chrome_geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
| 6 | 6 |
| 7 #include <functional> | 7 #include <functional> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 bool GeolocationConfirmInfoBarDelegate::LinkClicked( | 208 bool GeolocationConfirmInfoBarDelegate::LinkClicked( |
| 209 WindowOpenDisposition disposition) { | 209 WindowOpenDisposition disposition) { |
| 210 const char kGeolocationLearnMoreUrl[] = | 210 const char kGeolocationLearnMoreUrl[] = |
| 211 #if defined(OS_CHROMEOS) | 211 #if defined(OS_CHROMEOS) |
| 212 "https://www.google.com/support/chromeos/bin/answer.py?answer=142065"; | 212 "https://www.google.com/support/chromeos/bin/answer.py?answer=142065"; |
| 213 #else | 213 #else |
| 214 "https://www.google.com/support/chrome/bin/answer.py?answer=142065"; | 214 "https://www.google.com/support/chrome/bin/answer.py?answer=142065"; |
| 215 #endif | 215 #endif |
| 216 | 216 |
| 217 // Ignore the click disposition and always open in a new top level tab. | |
| 218 tab_contents_->OpenURL( | 217 tab_contents_->OpenURL( |
| 219 google_util::AppendGoogleLocaleParam(GURL(kGeolocationLearnMoreUrl)), | 218 google_util::AppendGoogleLocaleParam(GURL(kGeolocationLearnMoreUrl)), |
| 220 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 219 GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
| 220 PageTransition::LINK); |
| 221 return false; // Do not dismiss the info bar. | 221 return false; // Do not dismiss the info bar. |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace | 224 } // namespace |
| 225 | 225 |
| 226 | 226 |
| 227 // GeolocationInfoBarQueueController::PendingInfoBarRequest ------------------- | 227 // GeolocationInfoBarQueueController::PendingInfoBarRequest ------------------- |
| 228 | 228 |
| 229 struct GeolocationInfoBarQueueController::PendingInfoBarRequest { | 229 struct GeolocationInfoBarQueueController::PendingInfoBarRequest { |
| 230 public: | 230 public: |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 621 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
| 622 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod( | 622 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod( |
| 623 this, &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, | 623 this, &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, |
| 624 render_process_id, render_view_id, bridge_id)); | 624 render_process_id, render_view_id, bridge_id)); |
| 625 return; | 625 return; |
| 626 } | 626 } |
| 627 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 627 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 628 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, | 628 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, |
| 629 render_view_id, bridge_id); | 629 render_view_id, bridge_id); |
| 630 } | 630 } |
| OLD | NEW |