Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(393)

Side by Side Diff: chrome/browser/ui/views/signed_certificate_timestamps_views.cc

Issue 231173004: [WebModal] Rename NativeWebContentsModalDialogManager to SingleWebContentsDialogManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constrained window test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/signed_certificate_timestamps_views.h" 5 #include "chrome/browser/ui/views/signed_certificate_timestamps_views.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 content::WebContents* web_contents, 104 content::WebContents* web_contents,
105 const net::SignedCertificateTimestampAndStatusList& sct_list) 105 const net::SignedCertificateTimestampAndStatusList& sct_list)
106 : web_contents_(web_contents), sct_info_view_(NULL), sct_list_(sct_list) { 106 : web_contents_(web_contents), sct_info_view_(NULL), sct_list_(sct_list) {
107 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 107 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
108 WebContentsModalDialogManager::FromWebContents(web_contents); 108 WebContentsModalDialogManager::FromWebContents(web_contents);
109 WebContentsModalDialogManagerDelegate* modal_delegate = 109 WebContentsModalDialogManagerDelegate* modal_delegate =
110 web_contents_modal_dialog_manager->delegate(); 110 web_contents_modal_dialog_manager->delegate();
111 DCHECK(modal_delegate); 111 DCHECK(modal_delegate);
112 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( 112 views::Widget* window = views::Widget::CreateWindowAsFramelessChild(
113 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 113 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
114 web_contents_modal_dialog_manager->ShowDialog(window->GetNativeView()); 114 web_contents_modal_dialog_manager->ShowModalDialog(
115 window->GetNativeView());
115 } 116 }
116 117
117 SignedCertificateTimestampsViews::~SignedCertificateTimestampsViews() {} 118 SignedCertificateTimestampsViews::~SignedCertificateTimestampsViews() {}
118 119
119 base::string16 SignedCertificateTimestampsViews::GetWindowTitle() const { 120 base::string16 SignedCertificateTimestampsViews::GetWindowTitle() const {
120 return l10n_util::GetStringUTF16(IDS_SCT_VIEWER_TITLE); 121 return l10n_util::GetStringUTF16(IDS_SCT_VIEWER_TITLE);
121 } 122 }
122 123
123 int SignedCertificateTimestampsViews::GetDialogButtons() const { 124 int SignedCertificateTimestampsViews::GetDialogButtons() const {
124 return ui::DIALOG_BUTTON_CANCEL; 125 return ui::DIALOG_BUTTON_CANCEL;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 sct_info_view_->SetSignedCertificateTimestamp(*(sct_list_[sct_index].sct), 183 sct_info_view_->SetSignedCertificateTimestamp(*(sct_list_[sct_index].sct),
183 sct_list_[sct_index].status); 184 sct_list_[sct_index].status);
184 } 185 }
185 186
186 void SignedCertificateTimestampsViews::Observe( 187 void SignedCertificateTimestampsViews::Observe(
187 int type, 188 int type,
188 const content::NotificationSource& source, 189 const content::NotificationSource& source,
189 const content::NotificationDetails& details) { 190 const content::NotificationDetails& details) {
190 GetWidget()->Close(); 191 GetWidget()->Close();
191 } 192 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/pdf_password_dialog.cc ('k') | chrome/browser/ui/views/ssl_client_certificate_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698