diff options
author | jonross@chromium.org <jonross@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-02 20:37:45 +0000 |
---|---|---|
committer | jonross@chromium.org <jonross@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-02 20:37:45 +0000 |
commit | 8209f7c1d414bc566b35f72dbd5df4ecb13edcaa (patch) | |
tree | 6fde7e7e0c60bdb9cdf383ffa3f836343c6f4fc5 /ash | |
parent | c3deb1fd2cfdc967f8238ecc254f4bf25afeebe9 (diff) | |
download | chromium_src-8209f7c1d414bc566b35f72dbd5df4ecb13edcaa.zip chromium_src-8209f7c1d414bc566b35f72dbd5df4ecb13edcaa.tar.gz chromium_src-8209f7c1d414bc566b35f72dbd5df4ecb13edcaa.tar.bz2 |
Update Status Area Paint Scheduling
With each TrayBackgroundView now backed by its own layer, calling SchedulePaint on StatusAreaWidgetDelegate no longer notifies them of the need to paint.
When the shelf changes its dimming state it triggers painting. Add support for StatusAreaWidget to notify each of the layer backed trays that painting is needed
TEST=Launch a non-maximized browser. The system tray will be a dark grey. Maximize the browser. The tray should be a lighter grey. This will mimic the colour changes of the application launcher on the shelf.
BUG=378115
Review URL: https://codereview.chromium.org/302153002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shelf/shelf_widget.cc | 2 | ||||
-rw-r--r-- | ash/system/status_area_widget.cc | 11 | ||||
-rw-r--r-- | ash/system/status_area_widget.h | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index 544bccb..30b1990 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc @@ -717,7 +717,7 @@ void ShelfWidget::SetDimsShelf(bool dimming) { // status area background, app list button and overflow button. if (shelf_) shelf_->SchedulePaint(); - status_area_widget_->GetContentsView()->SchedulePaint(); + status_area_widget_->SchedulePaint(); } bool ShelfWidget::GetDimsShelf() const { diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc index ac2cffb..92aa950 100644 --- a/ash/system/status_area_widget.cc +++ b/ash/system/status_area_widget.cc @@ -117,6 +117,17 @@ bool StatusAreaWidget::IsMessageBubbleShown() const { web_notification_tray_->IsMessageCenterBubbleVisible())); } +void StatusAreaWidget::SchedulePaint() { + status_area_widget_delegate_->SchedulePaint(); + web_notification_tray_->SchedulePaint(); + system_tray_->SchedulePaint(); +#if defined(OS_CHROMEOS) + virtual_keyboard_tray_->SchedulePaint(); + logout_button_tray_->SchedulePaint(); +#endif + overview_button_tray_->SchedulePaint(); +} + void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) { Widget::OnNativeWidgetActivationChanged(active); if (active) diff --git a/ash/system/status_area_widget.h b/ash/system/status_area_widget.h index 41ea72e..e7e12cc 100644 --- a/ash/system/status_area_widget.h +++ b/ash/system/status_area_widget.h @@ -67,6 +67,10 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget { // True if any message bubble is shown. bool IsMessageBubbleShown() const; + // Notifies child trays, and the |status_area_widget_delegate_| to schedule a + // paint. + void SchedulePaint(); + // Overridden from views::Widget: virtual void OnNativeWidgetActivationChanged(bool active) OVERRIDE; |