Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / automation / testing_automation_provider_aura.cc
blob95e02c68004aa163c33ca5903e673183acd04d58
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.
5 #include "chrome/browser/automation/testing_automation_provider.h"
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"
13 #if defined(USE_ASH)
14 #include "ash/wm/window_util.h"
15 #endif
17 void TestingAutomationProvider::TerminateSession(int handle, bool* success) {
18 *success = false;
21 void 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;