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

Side by Side Diff: ash/common/wm/window_cycle_list.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/common/wm/window_cycle_list.h" 5 #include "ash/common/wm/window_cycle_list.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "ash/common/wm/mru_window_tracker.h" 10 #include "ash/common/wm/mru_window_tracker.h"
11 #include "ash/common/wm/window_state.h" 11 #include "ash/common/wm/window_state.h"
12 #include "ash/common/wm_root_window_controller.h" 12 #include "ash/common/wm_root_window_controller.h"
13 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
14 #include "ash/common/wm_window.h" 14 #include "ash/common/wm_window.h"
15 #include "ash/public/cpp/shell_window_ids.h" 15 #include "ash/public/cpp/shell_window_ids.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "ui/accessibility/ax_view_state.h" 17 #include "ui/accessibility/ax_node_data.h"
18 #include "ui/compositor/scoped_layer_animation_settings.h" 18 #include "ui/compositor/scoped_layer_animation_settings.h"
19 #include "ui/display/display.h" 19 #include "ui/display/display.h"
20 #include "ui/display/screen.h" 20 #include "ui/display/screen.h"
21 #include "ui/views/background.h" 21 #include "ui/views/background.h"
22 #include "ui/views/border.h" 22 #include "ui/views/border.h"
23 #include "ui/views/controls/label.h" 23 #include "ui/views/controls/label.h"
24 #include "ui/views/layout/box_layout.h" 24 #include "ui/views/layout/box_layout.h"
25 #include "ui/views/painter.h" 25 #include "ui/views/painter.h"
26 #include "ui/views/view.h" 26 #include "ui/views/view.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 // Padding is needed, so show the background and set the mirror view to be 162 // Padding is needed, so show the background and set the mirror view to be
163 // centered within it. 163 // centered within it.
164 preview_background_->SetBoundsRect(preview_area_bounds); 164 preview_background_->SetBoundsRect(preview_area_bounds);
165 preview_background_->SetVisible(true); 165 preview_background_->SetVisible(true);
166 preview_area_bounds.ClampToCenteredSize(mirror_view_->size()); 166 preview_area_bounds.ClampToCenteredSize(mirror_view_->size());
167 mirror_view_->SetPosition(preview_area_bounds.origin()); 167 mirror_view_->SetPosition(preview_area_bounds.origin());
168 } 168 }
169 169
170 void GetAccessibleState(ui::AXViewState* state) override { 170 void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
171 state->role = ui::AX_ROLE_WINDOW; 171 node_data->role = ui::AX_ROLE_WINDOW;
172 state->name = window_title_->text(); 172 node_data->SetName(window_title_->text());
173 } 173 }
174 174
175 // WmWindowObserver: 175 // WmWindowObserver:
176 void OnWindowDestroying(WmWindow* window) override { 176 void OnWindowDestroying(WmWindow* window) override {
177 window_observer_.Remove(window); 177 window_observer_.Remove(window);
178 } 178 }
179 179
180 void OnWindowTitleChanged(WmWindow* window) override { 180 void OnWindowTitleChanged(WmWindow* window) override {
181 window_title_->SetText(window->GetTitle()); 181 window_title_->SetText(window->GetTitle());
182 } 182 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 widget->Init(params); 623 widget->Init(params);
624 624
625 screen_observer_.Add(display::Screen::GetScreen()); 625 screen_observer_.Add(display::Screen::GetScreen());
626 widget->Show(); 626 widget->Show();
627 widget->SetCapture(cycle_view_); 627 widget->SetCapture(cycle_view_);
628 widget->set_auto_release_capture(false); 628 widget->set_auto_release_capture(false);
629 cycle_ui_widget_ = widget; 629 cycle_ui_widget_ = widget;
630 } 630 }
631 631
632 } // namespace ash 632 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/user/user_card_view.cc ('k') | ash/system/chromeos/screen_layout_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698