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

Unified Diff: ash/aura/wm_shelf_aura.cc

Issue 2072023003: mash: Break ash system tray dependencies on ash::ShelfWidget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/aura/wm_shelf_aura.h ('k') | ash/common/shelf/wm_shelf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_shelf_aura.cc
diff --git a/ash/aura/wm_shelf_aura.cc b/ash/aura/wm_shelf_aura.cc
index fc9f583a64e61f15ce276a1a861a2ddd2a2a32cb..1effb10a78d4ea85720e992c9fb00742d712ec88 100644
--- a/ash/aura/wm_shelf_aura.cc
+++ b/ash/aura/wm_shelf_aura.cc
@@ -9,6 +9,7 @@
#include "ash/common/wm_window.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h"
+#include "ash/shell.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -79,10 +80,22 @@ ShelfAutoHideState WmShelfAura::GetAutoHideState() const {
return shelf_layout_manager_->auto_hide_state();
}
+void WmShelfAura::UpdateAutoHideState() {
+ shelf_layout_manager_->UpdateAutoHideState();
+}
+
ShelfBackgroundType WmShelfAura::GetBackgroundType() const {
return shelf_layout_manager_->shelf_widget()->GetBackgroundType();
}
+bool WmShelfAura::IsDimmed() const {
+ return shelf_layout_manager_->shelf_widget()->GetDimsShelf();
+}
+
+bool WmShelfAura::IsVisible() const {
+ return shelf_->IsVisible();
+}
+
void WmShelfAura::UpdateVisibilityState() {
shelf_layout_manager_->UpdateVisibilityState();
}
@@ -92,6 +105,10 @@ ShelfVisibilityState WmShelfAura::GetVisibilityState() const {
: SHELF_HIDDEN;
}
+gfx::Rect WmShelfAura::GetIdealBounds() {
+ return shelf_layout_manager_->GetIdealBounds();
+}
+
gfx::Rect WmShelfAura::GetUserWorkAreaBounds() const {
return shelf_layout_manager_ ? shelf_layout_manager_->user_work_area_bounds()
: gfx::Rect();
@@ -106,6 +123,18 @@ gfx::Rect WmShelfAura::GetScreenBoundsOfItemIconForWindow(WmWindow* window) {
WmWindowAura::GetAuraWindow(window));
}
+void WmShelfAura::UpdateAutoHideForMouseEvent(ui::MouseEvent* event) {
+ // Auto-hide support for ash_sysui.
+ if (Shell::GetInstance()->in_mus() && shelf_layout_manager_)
+ shelf_layout_manager_->UpdateAutoHideForMouseEvent(event);
+}
+
+void WmShelfAura::UpdateAutoHideForGestureEvent(ui::GestureEvent* event) {
+ // Auto-hide support for ash_sysui.
+ if (Shell::GetInstance()->in_mus() && shelf_layout_manager_)
+ shelf_layout_manager_->UpdateAutoHideForGestureEvent(event);
+}
+
void WmShelfAura::AddObserver(WmShelfObserver* observer) {
observers_.AddObserver(observer);
}
« no previous file with comments | « ash/aura/wm_shelf_aura.h ('k') | ash/common/shelf/wm_shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698