[email protected] | 5bf80b45 | 2012-01-21 17:58:23 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 94fbaa4 | 2011-09-07 20:09:54 | [diff] [blame] | 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" | ||||
[email protected] | 02d6b23 | 2011-11-15 01:33:35 | [diff] [blame] | 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" | ||||
[email protected] | 94fbaa4 | 2011-09-07 20:09:54 | [diff] [blame] | 12 | |
[email protected] | 65d12044 | 2012-04-12 02:09:16 | [diff] [blame] | 13 | #if defined(USE_ASH) |
14 | #include "ash/wm/window_util.h" | ||||
15 | #endif | ||||
16 | |||||
[email protected] | 94fbaa4 | 2011-09-07 20:09:54 | [diff] [blame] | 17 | void TestingAutomationProvider::TerminateSession(int handle, bool* success) { |
[email protected] | 02d6b23 | 2011-11-15 01:33:35 | [diff] [blame] | 18 | *success = false; |
[email protected] | 94fbaa4 | 2011-09-07 20:09:54 | [diff] [blame] | 19 | } |
20 | |||||
[email protected] | 94fbaa4 | 2011-09-07 20:09:54 | [diff] [blame] | 21 | void TestingAutomationProvider::SetWindowBounds(int handle, |
22 | const gfx::Rect& bounds, | ||||
23 | bool* success) { | ||||
[email protected] | 02d6b23 | 2011-11-15 01:33:35 | [diff] [blame] | 24 | 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] | 94fbaa4 | 2011-09-07 20:09:54 | [diff] [blame] | 31 | } |