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

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

Issue 8968022: Shell related switches -> aura shell switches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/fullscreen_aura.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/automation/automation_window_tracker.h" 8 #include "chrome/browser/automation/automation_window_tracker.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 #include "ui/aura_shell/window_util.h" 11 #include "ui/aura_shell/window_util.h"
12 #include "ui/base/ui_base_types.h" 12 #include "ui/base/ui_base_types.h"
13 13
14 void TestingAutomationProvider::ActivateWindow(int handle) { 14 void TestingAutomationProvider::ActivateWindow(int handle) {
15 aura::Window* window = window_tracker_->GetResource(handle); 15 aura::Window* window = window_tracker_->GetResource(handle);
16 if (window) { 16 if (window) {
17 aura_shell::ActivateWindow(window); 17 aura_shell::ActivateWindow(window);
18 } 18 }
19 } 19 }
20 20
21 void TestingAutomationProvider::IsWindowMaximized(int handle, 21 void TestingAutomationProvider::IsWindowMaximized(int handle,
22 bool* is_maximized, 22 bool* is_maximized,
23 bool* success) { 23 bool* success) {
24 aura::Window* window = window_tracker_->GetResource(handle); 24 aura::Window* window = window_tracker_->GetResource(handle);
25 if (window) { 25 if (window) {
26 int show_state = window->GetIntProperty(aura::kShowStateKey); 26 int show_state = window->GetIntProperty(aura::client::kShowStateKey);
27 *is_maximized = (show_state == ui::SHOW_STATE_MAXIMIZED); 27 *is_maximized = (show_state == ui::SHOW_STATE_MAXIMIZED);
28 *success = true; 28 *success = true;
29 } else { 29 } else {
30 *success = false; 30 *success = false;
31 } 31 }
32 } 32 }
33 33
34 void TestingAutomationProvider::TerminateSession(int handle, bool* success) { 34 void TestingAutomationProvider::TerminateSession(int handle, bool* success) {
35 // TODO(benrg): what should this do in aura? It's 35 // TODO(benrg): what should this do in aura? It's
36 // currently unimplemented in most other providers. 36 // currently unimplemented in most other providers.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 *result = false; 77 *result = false;
78 } 78 }
79 } 79 }
80 80
81 void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) { 81 void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) {
82 const aura::Window* window = window_tracker_->GetResource(handle); 82 const aura::Window* window = window_tracker_->GetResource(handle);
83 DCHECK(window); 83 DCHECK(window);
84 *text = window->title(); 84 *text = window->title();
85 } 85 }
86 86
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/fullscreen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698