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

Unified Diff: ash/shelf/dimmer_view.cc

Issue 2235513002: mash shelf: Don't create shelf DimmerView in ShelfWidget on mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 4 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/shelf/dimmer_view.h ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/dimmer_view.cc
diff --git a/ash/shelf/dimmer_view.cc b/ash/shelf/dimmer_view.cc
index de49e040971486b89671a4b2f1362aaeeee6eac4..83aee9c164437c11dba416afbc35bb3a05855332 100644
--- a/ash/shelf/dimmer_view.cc
+++ b/ash/shelf/dimmer_view.cc
@@ -62,14 +62,6 @@ void DimmerView::SetHovered(bool hovered) {
: BACKGROUND_CHANGE_ANIMATE);
}
-void DimmerView::ForceUndimming(bool force) {
- bool previous = force_hovered_;
- force_hovered_ = force;
- // If the forced change does change the result we apply the change.
- if (is_hovered_ || force_hovered_ != is_hovered_ || previous)
- SetHovered(is_hovered_);
-}
-
void DimmerView::OnPaintBackground(gfx::Canvas* canvas) {
SkPaint paint;
ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
@@ -103,6 +95,22 @@ void DimmerView::UpdateBackground(BackgroundAnimator* animator, int alpha) {
void DimmerView::BackgroundAnimationEnded(BackgroundAnimator* animator) {}
+views::Widget* DimmerView::GetDimmerWidget() {
+ return GetWidget();
+}
+
+void DimmerView::ForceUndimming(bool force) {
+ bool previous = force_hovered_;
+ force_hovered_ = force;
+ // If the forced change does change the result we apply the change.
+ if (is_hovered_ || force_hovered_ != is_hovered_ || previous)
+ SetHovered(is_hovered_);
+}
+
+int DimmerView::GetDimmingAlphaForTest() {
+ return alpha_;
+}
+
void DimmerView::OnWindowBoundsChanged(WmWindow* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
« no previous file with comments | « ash/shelf/dimmer_view.h ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698