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/chromeos/external_protocol_dialog.h" | 5 #include "chrome/browser/chromeos/external_protocol_dialog.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog
.h" | 7 #include "chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog
.h" |
8 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 8 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
9 #include "chrome/browser/tab_contents/tab_util.h" | 9 #include "chrome/browser/tab_contents/tab_util.h" |
10 #include "chrome/browser/ui/browser_dialogs.h" | 10 #include "chrome/browser/ui/browser_dialogs.h" |
11 #include "chrome/grit/chromium_strings.h" | 11 #include "chrome/grit/chromium_strings.h" |
12 #include "chrome/grit/generated_resources.h" | 12 #include "chrome/grit/generated_resources.h" |
13 #include "components/strings/grit/components_strings.h" | |
14 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
15 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
16 #include "ui/gfx/text_elider.h" | 15 #include "ui/gfx/text_elider.h" |
17 #include "ui/views/controls/message_box_view.h" | 16 #include "ui/views/controls/message_box_view.h" |
18 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
19 #include "url/gurl.h" | 18 #include "url/gurl.h" |
20 | 19 |
21 using content::WebContents; | 20 using content::WebContents; |
22 | 21 |
23 namespace { | 22 namespace { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 if (web_contents) { | 107 if (web_contents) { |
109 parent_window = web_contents->GetTopLevelNativeWindow(); | 108 parent_window = web_contents->GetTopLevelNativeWindow(); |
110 } else { | 109 } else { |
111 // Dialog is top level if we don't have a web_contents associated with us. | 110 // Dialog is top level if we don't have a web_contents associated with us. |
112 parent_window = NULL; | 111 parent_window = NULL; |
113 } | 112 } |
114 views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show(); | 113 views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show(); |
115 chrome::RecordDialogCreation( | 114 chrome::RecordDialogCreation( |
116 chrome::DialogIdentifier::EXTERNAL_PROTOCOL_CHROMEOS); | 115 chrome::DialogIdentifier::EXTERNAL_PROTOCOL_CHROMEOS); |
117 } | 116 } |
OLD | NEW |