OLD | NEW |
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 Loading... |
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 |
OLD | NEW |