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

Side by Side Diff: ash/system/status_area_widget.cc

Issue 2007003002: mash: Preliminary support for shelf auto-hide (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shutdown
Patch Set: rebase Created 4 years, 7 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
« no previous file with comments | « ash/system/status_area_widget.h ('k') | ash/test/test_shelf_delegate.h » ('j') | 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/system/status_area_widget.h" 5 #include "ash/system/status_area_widget.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #endif 126 #endif
127 overview_button_tray_->SchedulePaint(); 127 overview_button_tray_->SchedulePaint();
128 } 128 }
129 129
130 void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) { 130 void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) {
131 Widget::OnNativeWidgetActivationChanged(active); 131 Widget::OnNativeWidgetActivationChanged(active);
132 if (active) 132 if (active)
133 status_area_widget_delegate_->SetPaneFocusAndFocusDefault(); 133 status_area_widget_delegate_->SetPaneFocusAndFocusDefault();
134 } 134 }
135 135
136 void StatusAreaWidget::OnMouseEvent(ui::MouseEvent* event) {
137 Widget::OnMouseEvent(event);
138 if (Shell::GetInstance()->in_mus() && shelf_widget_->shelf_layout_manager())
139 shelf_widget_->shelf_layout_manager()->UpdateAutoHideForMouseEvent(event);
140 }
141
142 void StatusAreaWidget::OnGestureEvent(ui::GestureEvent* event) {
143 Widget::OnGestureEvent(event);
144 if (Shell::GetInstance()->in_mus() && shelf_widget_->shelf_layout_manager())
145 shelf_widget_->shelf_layout_manager()->UpdateAutoHideForGestureEvent(event);
146 }
147
136 void StatusAreaWidget::AddSystemTray() { 148 void StatusAreaWidget::AddSystemTray() {
137 system_tray_ = new SystemTray(this); 149 system_tray_ = new SystemTray(this);
138 status_area_widget_delegate_->AddTray(system_tray_); 150 status_area_widget_delegate_->AddTray(system_tray_);
139 } 151 }
140 152
141 void StatusAreaWidget::AddWebNotificationTray() { 153 void StatusAreaWidget::AddWebNotificationTray() {
142 web_notification_tray_ = new WebNotificationTray(this); 154 web_notification_tray_ = new WebNotificationTray(this);
143 status_area_widget_delegate_->AddTray(web_notification_tray_); 155 status_area_widget_delegate_->AddTray(web_notification_tray_);
144 } 156 }
145 157
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); 205 web_notification_tray_->UpdateAfterLoginStatusChange(login_status);
194 #if defined(OS_CHROMEOS) 206 #if defined(OS_CHROMEOS)
195 if (logout_button_tray_) 207 if (logout_button_tray_)
196 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); 208 logout_button_tray_->UpdateAfterLoginStatusChange(login_status);
197 #endif 209 #endif
198 if (overview_button_tray_) 210 if (overview_button_tray_)
199 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); 211 overview_button_tray_->UpdateAfterLoginStatusChange(login_status);
200 } 212 }
201 213
202 } // namespace ash 214 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/status_area_widget.h ('k') | ash/test/test_shelf_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698