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 3// found in the LICENSE file. 4 5#include "chrome/browser/automation/testing_automation_provider.h" 6 7#include "base/logging.h" 8#include "chrome/browser/automation/automation_window_tracker.h" 9#include "ui/aura/client/aura_constants.h" 10#include "ui/aura/window.h" 11#include "ui/base/ui_base_types.h" 12 13#if defined(USE_ASH) 14#include "ash/wm/window_util.h" 15#endif 16 17void TestingAutomationProvider::TerminateSession(int handle, bool* success) { 18 *success = false; 19} 20 21void TestingAutomationProvider::SetWindowBounds(int handle, 22 const gfx::Rect& bounds, 23 bool* success) { 24 aura::Window* window = window_tracker_->GetResource(handle); 25 if (window) { 26 window->SetBounds(bounds); 27 *success = true; 28 } else { 29 *success = false; 30 } 31} 32