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

Side by Side Diff: content/shell/browser/shell_javascript_dialog_win.cc

Issue 1223983002: Move WriteInto to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « content/common/sandbox_win.cc ('k') | crypto/aead_openssl.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_javascript_dialog.h" 5 #include "content/shell/browser/shell_javascript_dialog.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "content/shell/app/resource.h" 8 #include "content/shell/app/resource.h"
9 #include "content/shell/browser/shell.h" 9 #include "content/shell/browser/shell.h"
10 #include "content/shell/browser/shell_javascript_dialog_manager.h" 10 #include "content/shell/browser/shell_javascript_dialog_manager.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool finish = false; 46 bool finish = false;
47 bool result; 47 bool result;
48 switch (LOWORD(wparam)) { 48 switch (LOWORD(wparam)) {
49 case IDOK: 49 case IDOK:
50 finish = true; 50 finish = true;
51 result = true; 51 result = true;
52 if (owner->message_type_ == JAVASCRIPT_MESSAGE_TYPE_PROMPT) { 52 if (owner->message_type_ == JAVASCRIPT_MESSAGE_TYPE_PROMPT) {
53 int length = 53 int length =
54 GetWindowTextLength(GetDlgItem(dialog, IDC_PROMPTEDIT)) + 1; 54 GetWindowTextLength(GetDlgItem(dialog, IDC_PROMPTEDIT)) + 1;
55 GetDlgItemText(dialog, IDC_PROMPTEDIT, 55 GetDlgItemText(dialog, IDC_PROMPTEDIT,
56 WriteInto(&user_input, length), length); 56 base::WriteInto(&user_input, length), length);
57 } 57 }
58 break; 58 break;
59 case IDCANCEL: 59 case IDCANCEL:
60 finish = true; 60 finish = true;
61 result = false; 61 result = false;
62 break; 62 break;
63 } 63 }
64 if (finish) { 64 if (finish) {
65 owner->dialog_win_ = 0; 65 owner->dialog_win_ = 0;
66 owner->callback_.Run(result, user_input); 66 owner->callback_.Run(result, user_input);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 ShellJavaScriptDialog::~ShellJavaScriptDialog() { 104 ShellJavaScriptDialog::~ShellJavaScriptDialog() {
105 Cancel(); 105 Cancel();
106 } 106 }
107 107
108 void ShellJavaScriptDialog::Cancel() { 108 void ShellJavaScriptDialog::Cancel() {
109 if (dialog_win_) 109 if (dialog_win_)
110 DestroyWindow(dialog_win_); 110 DestroyWindow(dialog_win_);
111 } 111 }
112 112
113 } // namespace content 113 } // namespace content
OLDNEW
« no previous file with comments | « content/common/sandbox_win.cc ('k') | crypto/aead_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698