| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/chromeos/attestation/platform_verification_dialog.h" | 5 #include "chrome/browser/chromeos/attestation/platform_verification_dialog.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "chrome/browser/ui/singleton_tabs.h" | 10 #include "chrome/browser/ui/singleton_tabs.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 base::UTF8ToUTF16(origin), | 50 base::UTF8ToUTF16(origin), |
| 51 callback); | 51 callback); |
| 52 | 52 |
| 53 // Sets up the dialog widget and shows it. | 53 // Sets up the dialog widget and shows it. |
| 54 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 54 web_modal::WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| 55 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents); | 55 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents); |
| 56 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate = | 56 web_modal::WebContentsModalDialogManagerDelegate* modal_delegate = |
| 57 web_contents_modal_dialog_manager->delegate(); | 57 web_contents_modal_dialog_manager->delegate(); |
| 58 views::Widget* widget = views::Widget::CreateWindowAsFramelessChild( | 58 views::Widget* widget = views::Widget::CreateWindowAsFramelessChild( |
| 59 dialog, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 59 dialog, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
| 60 web_contents_modal_dialog_manager->ShowDialog(widget->GetNativeView()); | 60 web_contents_modal_dialog_manager->ShowWebModalDialog( |
| 61 widget->GetNativeView()); |
| 61 widget->Show(); | 62 widget->Show(); |
| 62 } | 63 } |
| 63 | 64 |
| 64 PlatformVerificationDialog::~PlatformVerificationDialog() { | 65 PlatformVerificationDialog::~PlatformVerificationDialog() { |
| 65 } | 66 } |
| 66 | 67 |
| 67 PlatformVerificationDialog::PlatformVerificationDialog( | 68 PlatformVerificationDialog::PlatformVerificationDialog( |
| 68 Browser* browser, | 69 Browser* browser, |
| 69 const base::string16& domain, | 70 const base::string16& domain, |
| 70 const PlatformVerificationFlow::Delegate::ConsentCallback& callback) | 71 const PlatformVerificationFlow::Delegate::ConsentCallback& callback) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 127 } |
| 127 | 128 |
| 128 void PlatformVerificationDialog::StyledLabelLinkClicked(const gfx::Range& range, | 129 void PlatformVerificationDialog::StyledLabelLinkClicked(const gfx::Range& range, |
| 129 int event_flags) { | 130 int event_flags) { |
| 130 chrome::ShowSingletonTab(browser_, GURL( | 131 chrome::ShowSingletonTab(browser_, GURL( |
| 131 chrome::kEnhancedPlaybackNotificationLearnMoreURL)); | 132 chrome::kEnhancedPlaybackNotificationLearnMoreURL)); |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace attestation | 135 } // namespace attestation |
| 135 } // namespace chromeos | 136 } // namespace chromeos |
| OLD | NEW |