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

Unified Diff: ash/shelf/shelf_layout_manager.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 missing files 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
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shell.h » ('j') | ash/shell.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 5e1aab01e84749a9e1ec42bf9fab99df80031511..b48d5f7cfc48471ccfb74e89b16c9884cdac66f5 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -541,6 +541,10 @@ bool ShelfLayoutManager::IsHorizontalAlignment() const {
GetAlignment() == SHELF_ALIGNMENT_TOP;
}
+gfx::Insets ShelfLayoutManager::GetWorkAreaInsets() const {
+ return work_area_insets_;
+}
+
// static
ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) {
ShelfWidget* shelf = RootWindowController::ForShelf(window)->shelf();
@@ -704,14 +708,15 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity(
shelf_->status_area_widget()->GetNativeView()->parent(),
status_bounds));
if (!state_.is_screen_locked) {
- gfx::Insets insets;
// If user session is blocked (login to new user session or add user to
// the existing session - multi-profile) then give 100% of work area only
// if keyboard is not shown.
if (!state_.is_adding_user_screen || !keyboard_bounds_.IsEmpty()) {
- insets = target_bounds.work_area_insets;
+ work_area_insets_ = target_bounds.work_area_insets;
+ } else {
+ work_area_insets_ = gfx::Insets();
}
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, insets);
+ Shell::GetInstance()->UpdateDisplayWorkAreaInsets(root_window_);
}
}
@@ -1131,7 +1136,8 @@ void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
// window.
if (session_state_delegate->IsUserSessionBlocked() &&
keyboard_is_about_to_hide) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, gfx::Insets());
+ work_area_insets_ = gfx::Insets();
+ Shell::GetInstance()->UpdateDisplayWorkAreaInsets(root_window_);
}
}
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shell.h » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698