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

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: Don't let ChromeVox Classic run on panel 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') | chrome/browser/chromeos/accessibility/accessibility_manager.h » ('j') | no next file with comments »
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..57683ff6f6664fb210a14c7f5ef6cc194ebe743a 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -196,6 +196,7 @@ ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf)
gesture_drag_amount_(0.f),
gesture_drag_auto_hide_state_(SHELF_AUTO_HIDE_SHOWN),
update_shelf_observer_(NULL),
+ chromevox_panel_height_(0),
duration_override_in_ms_(0) {
Shell::GetInstance()->AddShellObserver(this);
Shell::GetInstance()->lock_state_controller()->AddObserver(this);
@@ -541,6 +542,11 @@ bool ShelfLayoutManager::IsHorizontalAlignment() const {
GetAlignment() == SHELF_ALIGNMENT_TOP;
}
+void ShelfLayoutManager::SetChromeVoxPanelHeight(int height) {
+ chromevox_panel_height_ = height;
+ LayoutShelf();
+}
+
// static
ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) {
ShelfWidget* shelf = RootWindowController::ForShelf(window)->shelf();
@@ -834,6 +840,12 @@ void ShelfLayoutManager::CalculateTargetBounds(
target_bounds->work_area_insets += dock_insets;
}
+ // Also push in the work area insets for the ChromeVox panel if it's visible.
+ if (chromevox_panel_height_) {
+ gfx::Insets chromevox_insets(chromevox_panel_height_, 0, 0, 0);
+ target_bounds->work_area_insets += chromevox_insets;
+ }
+
target_bounds->opacity =
(gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS ||
state.visibility_state == SHELF_VISIBLE ||
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698