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 "chrome/browser/external_protocol/external_protocol_handler.h" | 7 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
8 #include "chrome/browser/tab_contents/tab_util.h" | |
8 #include "chrome/grit/chromium_strings.h" | 9 #include "chrome/grit/chromium_strings.h" |
9 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
10 #include "components/strings/grit/components_strings.h" | 11 #include "components/strings/grit/components_strings.h" |
11 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
12 #include "ui/gfx/text_elider.h" | 13 #include "ui/gfx/text_elider.h" |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 const size_t kMaxCommandSize = 32; | 17 const size_t kMaxCommandSize = 32; |
17 | 18 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 ElideCommandName(program_name_)); | 59 ElideCommandName(program_name_)); |
59 } | 60 } |
60 | 61 |
61 void ExternalProtocolDialogDelegate::DoAccept(const GURL& url, | 62 void ExternalProtocolDialogDelegate::DoAccept(const GURL& url, |
62 bool dont_block) const { | 63 bool dont_block) const { |
63 if (dont_block) { | 64 if (dont_block) { |
64 ExternalProtocolHandler::SetBlockState(url.scheme(), | 65 ExternalProtocolHandler::SetBlockState(url.scheme(), |
65 ExternalProtocolHandler::DONT_BLOCK); | 66 ExternalProtocolHandler::DONT_BLOCK); |
66 } | 67 } |
67 | 68 |
68 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck( | 69 content::WebContents* web_contents = |
sky
2016/12/15 20:44:28
Same comment.
davidsac (gone - try alexmos)
2016/12/15 22:40:23
Same reply.
| |
69 url, render_process_host_id_, tab_contents_id_); | 70 tab_util::GetWebContentsByID(render_process_host_id_, tab_contents_id_); |
71 | |
72 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents); | |
70 } | 73 } |
71 | 74 |
72 void ExternalProtocolDialogDelegate::DoCancel(const GURL& url, | 75 void ExternalProtocolDialogDelegate::DoCancel(const GURL& url, |
73 bool dont_block) const { | 76 bool dont_block) const { |
74 if (dont_block) { | 77 if (dont_block) { |
75 ExternalProtocolHandler::SetBlockState(url.scheme(), | 78 ExternalProtocolHandler::SetBlockState(url.scheme(), |
76 ExternalProtocolHandler::BLOCK); | 79 ExternalProtocolHandler::BLOCK); |
77 } | 80 } |
78 } | 81 } |
OLD | NEW |