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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_win.cc

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 HWND hwnd = window_tracker_->GetResource(handle); 75 HWND hwnd = window_tracker_->GetResource(handle);
76 ::ShowWindow(hwnd, visible ? SW_SHOW : SW_HIDE); 76 ::ShowWindow(hwnd, visible ? SW_SHOW : SW_HIDE);
77 *result = true; 77 *result = true;
78 } else { 78 } else {
79 *result = false; 79 *result = false;
80 } 80 }
81 } 81 }
82 82
83 void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) { 83 void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) {
84 gfx::NativeWindow window = window_tracker_->GetResource(handle); 84 gfx::NativeWindow window = window_tracker_->GetResource(handle);
85 std::wstring result; 85 string16 result;
86 int length = ::GetWindowTextLength(window) + 1; 86 int length = ::GetWindowTextLength(window) + 1;
87 ::GetWindowText(window, WriteInto(&result, length), length); 87 ::GetWindowText(window, WriteInto(&result, length), length);
88 text->assign(WideToUTF16(result)); 88 text->assign(WideToUTF16(result));
89 } 89 }
90 90
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698