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

Unified Diff: ash/common/system/web_notification/ash_popup_alignment_delegate.cc

Issue 2103603002: mash: Remove StatusAreaWidget references from system tray classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, rename SetSystemTrayHeight to SetTrayBubbleHeight 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
Index: ash/common/system/web_notification/ash_popup_alignment_delegate.cc
diff --git a/ash/system/web_notification/ash_popup_alignment_delegate.cc b/ash/common/system/web_notification/ash_popup_alignment_delegate.cc
similarity index 89%
rename from ash/system/web_notification/ash_popup_alignment_delegate.cc
rename to ash/common/system/web_notification/ash_popup_alignment_delegate.cc
index d609974b22a5b5b8e8821a8ba75dac37ddcd8920..27d8f312ba3f277f9f0a72efb4d2f0458c9b24d6 100644
--- a/ash/system/web_notification/ash_popup_alignment_delegate.cc
+++ b/ash/common/system/web_notification/ash_popup_alignment_delegate.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/web_notification/ash_popup_alignment_delegate.h"
+#include "ash/common/system/web_notification/ash_popup_alignment_delegate.h"
#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shelf/shelf_types.h"
@@ -32,7 +32,7 @@ const int kNoToastMarginBorderAndShadowOffset = 2;
} // namespace
AshPopupAlignmentDelegate::AshPopupAlignmentDelegate(WmShelf* shelf)
- : screen_(NULL), shelf_(shelf), system_tray_height_(0) {
+ : screen_(NULL), shelf_(shelf), tray_bubble_height_(0) {
shelf_->AddObserver(this);
}
@@ -50,25 +50,25 @@ void AshPopupAlignmentDelegate::StartObserving(
work_area_ = display.work_area();
screen->AddObserver(this);
WmShell::Get()->AddShellObserver(this);
- if (system_tray_height_ > 0)
+ if (tray_bubble_height_ > 0)
UpdateWorkArea();
}
-void AshPopupAlignmentDelegate::SetSystemTrayHeight(int height) {
- system_tray_height_ = height;
+void AshPopupAlignmentDelegate::SetTrayBubbleHeight(int height) {
+ tray_bubble_height_ = height;
// If the shelf is shown during auto-hide state, the distance from the edge
// should be reduced by the height of shelf's shown height.
if (shelf_->GetVisibilityState() == SHELF_AUTO_HIDE &&
shelf_->GetAutoHideState() == SHELF_AUTO_HIDE_SHOWN) {
- system_tray_height_ -= GetShelfConstant(SHELF_SIZE) -
+ tray_bubble_height_ -= GetShelfConstant(SHELF_SIZE) -
GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE);
}
- if (system_tray_height_ > 0)
- system_tray_height_ += message_center::kMarginBetweenItems;
+ if (tray_bubble_height_ > 0)
+ tray_bubble_height_ += message_center::kMarginBetweenItems;
else
- system_tray_height_ = 0;
+ tray_bubble_height_ = 0;
DoUpdateIfPossible();
}
@@ -87,11 +87,11 @@ int AshPopupAlignmentDelegate::GetToastOriginX(
int AshPopupAlignmentDelegate::GetBaseLine() const {
return work_area_.bottom() - kNoToastMarginBorderAndShadowOffset -
- system_tray_height_;
+ tray_bubble_height_;
}
int AshPopupAlignmentDelegate::GetWorkAreaBottom() const {
- return work_area_.bottom() - system_tray_height_;
+ return work_area_.bottom() - tray_bubble_height_;
}
bool AshPopupAlignmentDelegate::IsTopDown() const {

Powered by Google App Engine
This is Rietveld 408576698