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

Unified Diff: ash/shell.cc

Issue 1274563004: Show ChromeVox caption panel when spoken feedback is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromevox_panel_html
Patch Set: Add hook to disable/close ChromeVox Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 27697f67abd5ab06eff3c729590e24018f245b5a..509a06f1cdcb630caf22d34af6cb2a5bc575ff98 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -364,10 +364,19 @@ void Shell::RotateFocus(Direction direction) {
: FocusCycler::BACKWARD);
}
-void Shell::SetDisplayWorkAreaInsets(Window* contains,
- const gfx::Insets& insets) {
+void Shell::UpdateDisplayWorkAreaInsets(Window* root_window) {
+ gfx::Insets shelf_insets =
+ ash::ShelfLayoutManager::ForShelf(root_window)->GetWorkAreaInsets();
+ gfx::Insets accessibility_insets =
+ accessibility_delegate_->GetWorkAreaInsets(root_window);
+ gfx::Insets merged_insets = gfx::Insets(
+ std::max(shelf_insets.top(), accessibility_insets.top()),
+ std::max(shelf_insets.left(), accessibility_insets.left()),
+ std::max(shelf_insets.bottom(), accessibility_insets.bottom()),
+ std::max(shelf_insets.right(), accessibility_insets.right()));
+
if (!window_tree_host_manager_->UpdateWorkAreaOfDisplayNearestWindow(
- contains, insets)) {
+ root_window, merged_insets)) {
return;
}
FOR_EACH_OBSERVER(ShellObserver, observers_,

Powered by Google App Engine
This is Rietveld 408576698