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

Side by Side Diff: chrome/browser/ui/webui/options2/certificate_manager_handler2.cc

Issue 10554010: Remove BrowserList::GetLastActive usage from WebUI pages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 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
« no previous file with comments | « chrome/browser/ui/webui/feedback_ui.cc ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui/webui/options2/certificate_manager_handler2.h" 5 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" // for FileAccessProvider 9 #include "base/file_util.h" // for FileAccessProvider
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 break; 486 break;
487 default: 487 default:
488 NOTREACHED(); 488 NOTREACHED();
489 } 489 }
490 } 490 }
491 491
492 void CertificateManagerHandler::View(const ListValue* args) { 492 void CertificateManagerHandler::View(const ListValue* args) {
493 net::X509Certificate* cert = CallbackArgsToCert(args); 493 net::X509Certificate* cert = CallbackArgsToCert(args);
494 if (!cert) 494 if (!cert)
495 return; 495 return;
496 ShowCertificateViewer(GetParentWindow(), cert); 496 ShowCertificateViewer(web_ui()->GetWebContents(), GetParentWindow(), cert);
497 } 497 }
498 498
499 void CertificateManagerHandler::GetCATrust(const ListValue* args) { 499 void CertificateManagerHandler::GetCATrust(const ListValue* args) {
500 net::X509Certificate* cert = CallbackArgsToCert(args); 500 net::X509Certificate* cert = CallbackArgsToCert(args);
501 if (!cert) { 501 if (!cert) {
502 web_ui()->CallJavascriptFunction("CertificateEditCaTrustOverlay.dismiss"); 502 web_ui()->CallJavascriptFunction("CertificateEditCaTrustOverlay.dismiss");
503 return; 503 return;
504 } 504 }
505 505
506 net::CertDatabase::TrustBits trust_bits = 506 net::CertDatabase::TrustBits trust_bits =
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", 1061 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady",
1062 ready); 1062 ready);
1063 } 1063 }
1064 #endif 1064 #endif
1065 1065
1066 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1066 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1067 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); 1067 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
1068 } 1068 }
1069 1069
1070 } // namespace options2 1070 } // namespace options2
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/feedback_ui.cc ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698