| 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/ui/external_protocol_dialog_delegate.h" | 5 #include "chrome/browser/ui/external_protocol_dialog_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| 11 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
| 12 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 12 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
| 13 #include "grit/chromium_strings.h" | 13 #include "chrome/grit/chromium_strings.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/gfx/text_elider.h" | 16 #include "ui/gfx/text_elider.h" |
| 17 | 17 |
| 18 ExternalProtocolDialogDelegate::ExternalProtocolDialogDelegate( | 18 ExternalProtocolDialogDelegate::ExternalProtocolDialogDelegate( |
| 19 const GURL& url, | 19 const GURL& url, |
| 20 int render_process_host_id, | 20 int render_process_host_id, |
| 21 int tab_contents_id) | 21 int tab_contents_id) |
| 22 : ProtocolDialogDelegate(url), | 22 : ProtocolDialogDelegate(url), |
| 23 render_process_host_id_(render_process_host_id), | 23 render_process_host_id_(render_process_host_id), |
| 24 tab_contents_id_(tab_contents_id), | 24 tab_contents_id_(tab_contents_id), |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void ExternalProtocolDialogDelegate::DoCancel( | 73 void ExternalProtocolDialogDelegate::DoCancel( |
| 74 const GURL& url, | 74 const GURL& url, |
| 75 bool dont_block) const { | 75 bool dont_block) const { |
| 76 if (dont_block) { | 76 if (dont_block) { |
| 77 ExternalProtocolHandler::SetBlockState( | 77 ExternalProtocolHandler::SetBlockState( |
| 78 url.scheme(), ExternalProtocolHandler::BLOCK); | 78 url.scheme(), ExternalProtocolHandler::BLOCK); |
| 79 } | 79 } |
| 80 } | 80 } |
| OLD | NEW |