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

Side by Side Diff: ash/shelf/shelf_widget.h

Issue 2190773003: [ABANDONED] Simplify ash shelf dimmer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore an EventHandler object; fix behavior tests. 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 unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('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 #ifndef ASH_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_SHELF_SHELF_WIDGET_H_
6 #define ASH_SHELF_SHELF_WIDGET_H_ 6 #define ASH_SHELF_SHELF_WIDGET_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Called by the activation delegate, before the shelf is activated 73 // Called by the activation delegate, before the shelf is activated
74 // when no other windows are visible. 74 // when no other windows are visible.
75 void WillActivateAsFallback() { activating_as_fallback_ = true; } 75 void WillActivateAsFallback() { activating_as_fallback_ = true; }
76 76
77 // Clean up prior to deletion. 77 // Clean up prior to deletion.
78 void Shutdown(); 78 void Shutdown();
79 79
80 // Force the shelf to be presented in an undimmed state. 80 // Force the shelf to be presented in an undimmed state.
81 void ForceUndimming(bool force); 81 void ForceUndimming(bool force);
82 82
83 // Overridden from views::WidgetObserver: 83 // views::WidgetObserver:
84 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; 84 void OnWidgetActivationChanged(views::Widget* widget, bool active) override;
85 85
86 // A function to test the current alpha used by the dimming bar. If there is 86 // ShelfLayoutManagerObserver:
87 // no dimmer active, the function will return -1.
88 int GetDimmingAlphaForTest();
89
90 // A function to test the bounds of the dimming bar. Returns gfx::Rect() if
91 // the dimmer is inactive.
92 gfx::Rect GetDimmerBoundsForTest();
93
94 // Disable dimming animations for running tests.
95 void DisableDimmingAnimationsForTest();
96
97 // ShelfLayoutManagerObserver overrides:
98 void WillDeleteShelfLayoutManager() override; 87 void WillDeleteShelfLayoutManager() override;
99 88
100 private: 89 private:
101 class DelegateView; 90 class DelegateView;
102 91
103 // views::Widget: 92 // views::Widget:
93 void OnDragEnter() override;
94 void OnDragExit() override;
104 void OnMouseEvent(ui::MouseEvent* event) override; 95 void OnMouseEvent(ui::MouseEvent* event) override;
105 void OnGestureEvent(ui::GestureEvent* event) override; 96 void OnGestureEvent(ui::GestureEvent* event) override;
106 97
107 // Owned by the shelf container's aura::Window. 98 // Owned by the shelf container's aura::Window.
108 ShelfLayoutManager* shelf_layout_manager_; 99 ShelfLayoutManager* shelf_layout_manager_;
109 std::unique_ptr<Shelf> shelf_; 100 std::unique_ptr<Shelf> shelf_;
110 StatusAreaWidget* status_area_widget_; 101 StatusAreaWidget* status_area_widget_;
111 102
112 // |delegate_view_| is the contents view of this widget and is cleaned up 103 // |delegate_view_| is the contents view of this widget and is cleaned up
113 // during CloseChildWindows of the associated RootWindowController. 104 // during CloseChildWindows of the associated RootWindowController.
114 DelegateView* delegate_view_; 105 DelegateView* delegate_view_;
115 BackgroundAnimator background_animator_; 106 BackgroundAnimator background_animator_;
116 bool activating_as_fallback_; 107 bool activating_as_fallback_;
117 108
118 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 109 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
119 }; 110 };
120 111
121 } // namespace ash 112 } // namespace ash
122 113
123 #endif // ASH_SHELF_SHELF_WIDGET_H_ 114 #endif // ASH_SHELF_SHELF_WIDGET_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698