| OLD | NEW |
| 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/common/system/status_area_widget.h" | 5 #include "ash/common/system/status_area_widget.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/shelf/wm_shelf.h" | 8 #include "ash/common/shelf/wm_shelf.h" |
| 9 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
| 10 #include "ash/common/system/overview/overview_button_tray.h" | 10 #include "ash/common/system/overview/overview_button_tray.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 bool StatusAreaWidget::ShouldShowShelf() const { | 170 bool StatusAreaWidget::ShouldShowShelf() const { |
| 171 if ((system_tray_ && system_tray_->ShouldShowShelf()) || | 171 if ((system_tray_ && system_tray_->ShouldShowShelf()) || |
| 172 (web_notification_tray_ && | 172 (web_notification_tray_ && |
| 173 web_notification_tray_->ShouldBlockShelfAutoHide())) | 173 web_notification_tray_->ShouldBlockShelfAutoHide())) |
| 174 return true; | 174 return true; |
| 175 | 175 |
| 176 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
| 177 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide()) | 177 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide()) |
| 178 return true; | 178 return true; |
| 179 |
| 180 if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide()) |
| 181 return true; |
| 179 #endif | 182 #endif |
| 180 | 183 |
| 181 if (!wm_shelf_->IsVisible()) | 184 if (!wm_shelf_->IsVisible()) |
| 182 return false; | 185 return false; |
| 183 | 186 |
| 184 // If the shelf is currently visible, don't hide the shelf if the mouse | 187 // If the shelf is currently visible, don't hide the shelf if the mouse |
| 185 // is in any of the notification bubbles. | 188 // is in any of the notification bubbles. |
| 186 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || | 189 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || |
| 187 (web_notification_tray_ && | 190 (web_notification_tray_ && |
| 188 web_notification_tray_->IsMouseInNotificationBubble()); | 191 web_notification_tray_->IsMouseInNotificationBubble()); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 return false; | 297 return false; |
| 295 } | 298 } |
| 296 #endif | 299 #endif |
| 297 | 300 |
| 298 void StatusAreaWidget::AddOverviewButtonTray() { | 301 void StatusAreaWidget::AddOverviewButtonTray() { |
| 299 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 302 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
| 300 status_area_widget_delegate_->AddTray(overview_button_tray_); | 303 status_area_widget_delegate_->AddTray(overview_button_tray_); |
| 301 } | 304 } |
| 302 | 305 |
| 303 } // namespace ash | 306 } // namespace ash |
| OLD | NEW |