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

Side by Side Diff: ash/wm/shelf_layout_manager.cc

Issue 10825389: Fix accessability for web notification tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix asan bug Created 8 years, 4 months 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 | « ash/system/web_notification/web_notification_tray.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/shelf_layout_manager.h" 5 #include "ash/wm/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher.h" 9 #include "ash/launcher/launcher.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/shell_delegate.h" 12 #include "ash/shell_delegate.h"
13 #include "ash/shell_window_ids.h" 13 #include "ash/shell_window_ids.h"
14 #include "ash/system/status_area_widget.h" 14 #include "ash/system/status_area_widget.h"
15 #include "ash/system/tray/system_tray.h"
16 #include "ash/system/web_notification/web_notification_tray.h"
17 #include "ash/wm/workspace_controller.h" 15 #include "ash/wm/workspace_controller.h"
18 #include "base/auto_reset.h" 16 #include "base/auto_reset.h"
19 #include "base/i18n/rtl.h" 17 #include "base/i18n/rtl.h"
20 #include "ui/aura/client/activation_client.h" 18 #include "ui/aura/client/activation_client.h"
21 #include "ui/aura/event_filter.h" 19 #include "ui/aura/event_filter.h"
22 #include "ui/aura/root_window.h" 20 #include "ui/aura/root_window.h"
23 #include "ui/base/event.h" 21 #include "ui/base/event.h"
24 #include "ui/compositor/layer.h" 22 #include "ui/compositor/layer.h"
25 #include "ui/compositor/layer_animation_observer.h" 23 #include "ui/compositor/layer_animation_observer.h"
26 #include "ui/compositor/layer_animator.h" 24 #include "ui/compositor/layer_animator.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 target_bounds->opacity = 509 target_bounds->opacity =
512 (state.visibility_state == VISIBLE || 510 (state.visibility_state == VISIBLE ||
513 state.visibility_state == AUTO_HIDE) ? 1.0f : 0.0f; 511 state.visibility_state == AUTO_HIDE) ? 1.0f : 0.0f;
514 } 512 }
515 513
516 void ShelfLayoutManager::UpdateShelfBackground( 514 void ShelfLayoutManager::UpdateShelfBackground(
517 BackgroundAnimator::ChangeType type) { 515 BackgroundAnimator::ChangeType type) {
518 bool launcher_paints = GetLauncherPaintsBackground(); 516 bool launcher_paints = GetLauncherPaintsBackground();
519 if (launcher_) 517 if (launcher_)
520 launcher_->SetPaintsBackground(launcher_paints, type); 518 launcher_->SetPaintsBackground(launcher_paints, type);
521 // SystemTray normally draws a background, but we don't want it to draw a 519 // The status area normally draws a background, but we don't want it to draw a
522 // background when the launcher does. 520 // background when the launcher does.
523 StatusAreaWidget* status_area_widget = 521 StatusAreaWidget* status_area_widget =
524 Shell::GetInstance()->status_area_widget(); 522 Shell::GetInstance()->status_area_widget();
525 if (status_area_widget) 523 if (status_area_widget)
526 status_area_widget->SetPaintsBackground(!launcher_paints, type); 524 status_area_widget->SetPaintsBackground(!launcher_paints, type);
527 } 525 }
528 526
529 bool ShelfLayoutManager::GetLauncherPaintsBackground() const { 527 bool ShelfLayoutManager::GetLauncherPaintsBackground() const {
530 return (!state_.is_screen_locked && window_overlaps_shelf_) || 528 return (!state_.is_screen_locked && window_overlaps_shelf_) ||
531 state_.visibility_state == AUTO_HIDE; 529 state_.visibility_state == AUTO_HIDE;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { 602 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const {
605 if (state.visibility_state == VISIBLE) 603 if (state.visibility_state == VISIBLE)
606 return size; 604 return size;
607 if (state.visibility_state == AUTO_HIDE) 605 if (state.visibility_state == AUTO_HIDE)
608 return kAutoHideSize; 606 return kAutoHideSize;
609 return 0; 607 return 0;
610 } 608 }
611 609
612 } // namespace internal 610 } // namespace internal
613 } // namespace ash 611 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698