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

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

Issue 10020048: Work on USE_ASH/USE_AURA split. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 8 years, 8 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 | « ash/wm/custom_frame_view_ash.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | 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 "ash/wm/window_util.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "chrome/browser/automation/automation_window_tracker.h" 8 #include "chrome/browser/automation/automation_window_tracker.h"
10 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
11 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
12 #include "ui/base/ui_base_types.h" 11 #include "ui/base/ui_base_types.h"
13 12
13 #if defined(USE_ASH)
14 #include "ash/wm/window_util.h"
15 #endif
16
14 void TestingAutomationProvider::ActivateWindow(int handle) { 17 void TestingAutomationProvider::ActivateWindow(int handle) {
18 #if defined(USE_ASH)
15 aura::Window* window = window_tracker_->GetResource(handle); 19 aura::Window* window = window_tracker_->GetResource(handle);
16 if (window) { 20 if (window) {
17 ash::wm::ActivateWindow(window); 21 ash::wm::ActivateWindow(window);
18 } 22 }
23 #else
24 NOTIMPLEMENTED();
25 #endif
19 } 26 }
20 27
21 void TestingAutomationProvider::IsWindowMaximized(int handle, 28 void TestingAutomationProvider::IsWindowMaximized(int handle,
22 bool* is_maximized, 29 bool* is_maximized,
23 bool* success) { 30 bool* success) {
24 aura::Window* window = window_tracker_->GetResource(handle); 31 aura::Window* window = window_tracker_->GetResource(handle);
25 if (window) { 32 if (window) {
26 *is_maximized = window->GetProperty(aura::client::kShowStateKey) == 33 *is_maximized = window->GetProperty(aura::client::kShowStateKey) ==
27 ui::SHOW_STATE_MAXIMIZED; 34 ui::SHOW_STATE_MAXIMIZED;
28 *success = true; 35 *success = true;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } else { 80 } else {
74 *result = false; 81 *result = false;
75 } 82 }
76 } 83 }
77 84
78 void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) { 85 void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) {
79 const aura::Window* window = window_tracker_->GetResource(handle); 86 const aura::Window* window = window_tracker_->GetResource(handle);
80 DCHECK(window); 87 DCHECK(window);
81 *text = window->title(); 88 *text = window->title();
82 } 89 }
OLDNEW
« no previous file with comments | « ash/wm/custom_frame_view_ash.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698