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

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

Issue 16746002: Use a direct include of strings headers in chrome/auto*/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome/browser/automation/testing_automation_provider_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/automation/automation_browser_tracker.h" 11 #include "chrome/browser/automation/automation_browser_tracker.h"
12 #include "chrome/browser/automation/automation_window_tracker.h" 12 #include "chrome/browser/automation/automation_window_tracker.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_window.h" 14 #include "chrome/browser/ui/browser_window.h"
15 15
16 void TestingAutomationProvider::TerminateSession(int handle, bool* success) { 16 void TestingAutomationProvider::TerminateSession(int handle, bool* success) {
17 *success = false; 17 *success = false;
18 18
19 if (browser_tracker_->ContainsHandle(handle)) { 19 if (browser_tracker_->ContainsHandle(handle)) {
20 Browser* browser = browser_tracker_->GetResource(handle); 20 Browser* browser = browser_tracker_->GetResource(handle);
21 HWND window = browser->window()->GetNativeWindow(); 21 HWND window = browser->window()->GetNativeWindow();
22 *success = (::PostMessageW(window, WM_ENDSESSION, 0, 0) == TRUE); 22 *success = (::PostMessageW(window, WM_ENDSESSION, 0, 0) == TRUE);
23 } 23 }
24 } 24 }
25 25
26 void TestingAutomationProvider::SetWindowBounds(int handle, 26 void TestingAutomationProvider::SetWindowBounds(int handle,
27 const gfx::Rect& bounds, 27 const gfx::Rect& bounds,
28 bool* success) { 28 bool* success) {
29 *success = false; 29 *success = false;
30 if (window_tracker_->ContainsHandle(handle)) { 30 if (window_tracker_->ContainsHandle(handle)) {
31 HWND hwnd = window_tracker_->GetResource(handle); 31 HWND hwnd = window_tracker_->GetResource(handle);
32 if (::MoveWindow(hwnd, bounds.x(), bounds.y(), bounds.width(), 32 if (::MoveWindow(hwnd, bounds.x(), bounds.y(), bounds.width(),
33 bounds.height(), true)) { 33 bounds.height(), true)) {
34 *success = true; 34 *success = true;
35 } 35 }
36 } 36 }
37 } 37 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698