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

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

Issue 2802703004: Log creation for many dialog box types. (Closed)
Patch Set: Enums better match class names. Created 3 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
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/views/crypto_module_password_dialog_view.h" 5 #include "chrome/browser/ui/views/crypto_module_password_dialog_view.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_dialogs.h"
8 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
9 #include "components/strings/grit/components_strings.h" 10 #include "components/strings/grit/components_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/events/event.h" 12 #include "ui/events/event.h"
12 #include "ui/views/controls/label.h" 13 #include "ui/views/controls/label.h"
13 #include "ui/views/controls/textfield/textfield.h" 14 #include "ui/views/controls/textfield/textfield.h"
14 #include "ui/views/layout/grid_layout.h" 15 #include "ui/views/layout/grid_layout.h"
15 #include "ui/views/layout/layout_constants.h" 16 #include "ui/views/layout/layout_constants.h"
16 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
17 18
18 namespace chrome { 19 namespace chrome {
19 20
20 //////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////////
21 // CryptoModulePasswordDialogView, public: 22 // CryptoModulePasswordDialogView, public:
22 23
23 CryptoModulePasswordDialogView::CryptoModulePasswordDialogView( 24 CryptoModulePasswordDialogView::CryptoModulePasswordDialogView(
24 const std::string& slot_name, 25 const std::string& slot_name,
25 CryptoModulePasswordReason reason, 26 CryptoModulePasswordReason reason,
26 const std::string& hostname, 27 const std::string& hostname,
27 const CryptoModulePasswordCallback& callback) 28 const CryptoModulePasswordCallback& callback)
28 : callback_(callback) { 29 : callback_(callback) {
29 Init(hostname, slot_name, reason); 30 Init(hostname, slot_name, reason);
31 chrome::RecordDialogCreation(chrome::DialogIdentifier::CRYPTO_PASSWORD);
30 } 32 }
31 33
32 CryptoModulePasswordDialogView::~CryptoModulePasswordDialogView() { 34 CryptoModulePasswordDialogView::~CryptoModulePasswordDialogView() {
33 } 35 }
34 36
35 //////////////////////////////////////////////////////////////////////////////// 37 ////////////////////////////////////////////////////////////////////////////////
36 // CryptoModulePasswordDialogView, private: 38 // CryptoModulePasswordDialogView, private:
37 39
38 views::View* CryptoModulePasswordDialogView::GetInitiallyFocusedView() { 40 views::View* CryptoModulePasswordDialogView::GetInitiallyFocusedView() {
39 return password_entry_; 41 return password_entry_;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 CryptoModulePasswordReason reason, 154 CryptoModulePasswordReason reason,
153 const std::string& hostname, 155 const std::string& hostname,
154 gfx::NativeWindow parent, 156 gfx::NativeWindow parent,
155 const CryptoModulePasswordCallback& callback) { 157 const CryptoModulePasswordCallback& callback) {
156 CryptoModulePasswordDialogView* dialog = 158 CryptoModulePasswordDialogView* dialog =
157 new CryptoModulePasswordDialogView(slot_name, reason, hostname, callback); 159 new CryptoModulePasswordDialogView(slot_name, reason, hostname, callback);
158 views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent)->Show(); 160 views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent)->Show();
159 } 161 }
160 162
161 } // namespace chrome 163 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698