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

Side by Side Diff: chrome/browser/ui/webui/certificate_viewer_webui.cc

Issue 12221055: Use a uniform opaque type to represent web contents modal dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable unused webui certificate viewer on linux Created 7 years, 10 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 (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/certificate_viewer_webui.h" 5 #include "chrome/browser/ui/webui/certificate_viewer_webui.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/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 void CertificateViewerDialog::Show(WebContents* web_contents, 70 void CertificateViewerDialog::Show(WebContents* web_contents,
71 gfx::NativeWindow parent) { 71 gfx::NativeWindow parent) {
72 // TODO(bshe): UI tweaks needed for Aura HTML Dialog, such as adding padding 72 // TODO(bshe): UI tweaks needed for Aura HTML Dialog, such as adding padding
73 // on the title for Aura ConstrainedWebDialogUI. 73 // on the title for Aura ConstrainedWebDialogUI.
74 window_ = CreateConstrainedWebDialog( 74 window_ = CreateConstrainedWebDialog(
75 web_contents->GetBrowserContext(), 75 web_contents->GetBrowserContext(),
76 this, 76 this,
77 NULL, 77 NULL,
78 web_contents)->GetWindow()->GetNativeWindow(); 78 web_contents)->GetWindow()->GetNativeDialog();
79 } 79 }
80 80
81 ui::ModalType CertificateViewerDialog::GetDialogModalType() const { 81 ui::ModalType CertificateViewerDialog::GetDialogModalType() const {
82 return ui::MODAL_TYPE_NONE; 82 return ui::MODAL_TYPE_NONE;
83 } 83 }
84 84
85 string16 CertificateViewerDialog::GetDialogTitle() const { 85 string16 CertificateViewerDialog::GetDialogTitle() const {
86 return title_; 86 return title_;
87 } 87 }
88 88
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 const base::ListValue* args) const { 403 const base::ListValue* args) const {
404 int cert_index; 404 int cert_index;
405 double val; 405 double val;
406 if (!(args->GetDouble(0, &val))) 406 if (!(args->GetDouble(0, &val)))
407 return -1; 407 return -1;
408 cert_index = static_cast<int>(val); 408 cert_index = static_cast<int>(val);
409 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size())) 409 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size()))
410 return -1; 410 return -1;
411 return cert_index; 411 return cert_index;
412 } 412 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/web_contents_modal_dialog_manager_unittest.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698