blob: 95e02c68004aa163c33ca5903e673183acd04d58 [file] [log] [blame]
[email protected]5bf80b452012-01-21 17:58:231// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]94fbaa42011-09-07 20:09:542// 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"
[email protected]02d6b232011-11-15 01:33:358#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"
[email protected]94fbaa42011-09-07 20:09:5412
[email protected]65d120442012-04-12 02:09:1613#if defined(USE_ASH)
14#include "ash/wm/window_util.h"
15#endif
16
[email protected]94fbaa42011-09-07 20:09:5417void TestingAutomationProvider::TerminateSession(int handle, bool* success) {
[email protected]02d6b232011-11-15 01:33:3518 *success = false;
[email protected]94fbaa42011-09-07 20:09:5419}
20
[email protected]94fbaa42011-09-07 20:09:5421void TestingAutomationProvider::SetWindowBounds(int handle,
22 const gfx::Rect& bounds,
23 bool* success) {
[email protected]02d6b232011-11-15 01:33:3524 aura::Window* window = window_tracker_->GetResource(handle);
25 if (window) {
26 window->SetBounds(bounds);
27 *success = true;
28 } else {
29 *success = false;
30 }
[email protected]94fbaa42011-09-07 20:09:5431}