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

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

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make PopupManager a thin API for WCMDM Created 6 years, 6 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 base::IntToString16(index + 1), 98 base::IntToString16(index + 1),
99 base::UTF8ToUTF16(origin), 99 base::UTF8ToUTF16(origin),
100 base::UTF8ToUTF16(status)); 100 base::UTF8ToUTF16(status));
101 } 101 }
102 102
103 SignedCertificateTimestampsViews::SignedCertificateTimestampsViews( 103 SignedCertificateTimestampsViews::SignedCertificateTimestampsViews(
104 content::WebContents* web_contents, 104 content::WebContents* web_contents,
105 const net::SignedCertificateTimestampAndStatusList& sct_list) 105 const net::SignedCertificateTimestampAndStatusList& sct_list)
106 : sct_info_view_(NULL), 106 : sct_info_view_(NULL),
107 sct_list_(sct_list) { 107 sct_list_(sct_list) {
108 // TODO(gbillock): Use PopupManager here.
108 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 109 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
109 WebContentsModalDialogManager::FromWebContents(web_contents); 110 WebContentsModalDialogManager::FromWebContents(web_contents);
110 WebContentsModalDialogManagerDelegate* modal_delegate = 111 WebContentsModalDialogManagerDelegate* modal_delegate =
111 web_contents_modal_dialog_manager->delegate(); 112 web_contents_modal_dialog_manager->delegate();
112 DCHECK(modal_delegate); 113 DCHECK(modal_delegate);
113 views::Widget* window = views::Widget::CreateWindowAsFramelessChild( 114 views::Widget* window = views::Widget::CreateWindowAsFramelessChild(
114 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 115 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
115 web_contents_modal_dialog_manager->ShowModalDialog( 116 web_contents_modal_dialog_manager->ShowModalDialog(
116 window->GetNativeView()); 117 window->GetNativeView());
117 } 118 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 sct_info_view_->SetSignedCertificateTimestamp(*(sct_list_[sct_index].sct), 185 sct_info_view_->SetSignedCertificateTimestamp(*(sct_list_[sct_index].sct),
185 sct_list_[sct_index].status); 186 sct_list_[sct_index].status);
186 } 187 }
187 188
188 void SignedCertificateTimestampsViews::Observe( 189 void SignedCertificateTimestampsViews::Observe(
189 int type, 190 int type,
190 const content::NotificationSource& source, 191 const content::NotificationSource& source,
191 const content::NotificationDetails& details) { 192 const content::NotificationDetails& details) {
192 GetWidget()->Close(); 193 GetWidget()->Close();
193 } 194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698