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

Side by Side Diff: ash/test/shelf_view_test_api.cc

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 years, 3 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
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 #include "ash/test/shelf_view_test_api.h" 5 #include "ash/test/shelf_view_test_api.h"
6 6
7 #include "ash/common/shelf/overflow_button.h" 7 #include "ash/common/shelf/overflow_button.h"
8 #include "ash/common/shelf/shelf_button.h" 8 #include "ash/common/shelf/shelf_button.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/shelf_model.h" 10 #include "ash/common/shelf/shelf_model.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 int ShelfViewTestAPI::GetLastVisibleIndex() { 62 int ShelfViewTestAPI::GetLastVisibleIndex() {
63 return shelf_view_->last_visible_index_; 63 return shelf_view_->last_visible_index_;
64 } 64 }
65 65
66 bool ShelfViewTestAPI::IsOverflowButtonVisible() { 66 bool ShelfViewTestAPI::IsOverflowButtonVisible() {
67 return shelf_view_->overflow_button_->visible(); 67 return shelf_view_->overflow_button_->visible();
68 } 68 }
69 69
70 void ShelfViewTestAPI::ShowOverflowBubble() { 70 void ShelfViewTestAPI::ShowOverflowBubble() {
71 if (!shelf_view_->IsShowingOverflowBubble()) 71 DCHECK(!shelf_view_->IsShowingOverflowBubble());
72 shelf_view_->ToggleOverflowBubble(); 72 shelf_view_->ToggleOverflowBubble();
73 }
74
75 void ShelfViewTestAPI::HideOverflowBubble() {
76 DCHECK(shelf_view_->IsShowingOverflowBubble());
77 shelf_view_->ToggleOverflowBubble();
78 }
79
80 bool ShelfViewTestAPI::IsShowingOverflowBubble() const {
81 return shelf_view_->IsShowingOverflowBubble();
73 } 82 }
74 83
75 const gfx::Rect& ShelfViewTestAPI::GetBoundsByIndex(int index) { 84 const gfx::Rect& ShelfViewTestAPI::GetBoundsByIndex(int index) {
76 return shelf_view_->view_model_->view_at(index)->bounds(); 85 return shelf_view_->view_model_->view_at(index)->bounds();
77 } 86 }
78 87
79 const gfx::Rect& ShelfViewTestAPI::GetIdealBoundsByIndex(int index) { 88 const gfx::Rect& ShelfViewTestAPI::GetIdealBoundsByIndex(int index) {
80 return shelf_view_->view_model_->ideal_bounds(index); 89 return shelf_view_->view_model_->ideal_bounds(index);
81 } 90 }
82 91
(...skipping 20 matching lines...) Expand all
103 if (!shelf_view_->launcher_menu_runner_) 112 if (!shelf_view_->launcher_menu_runner_)
104 return; 113 return;
105 114
106 shelf_view_->launcher_menu_runner_->Cancel(); 115 shelf_view_->launcher_menu_runner_->Cancel();
107 } 116 }
108 117
109 OverflowBubble* ShelfViewTestAPI::overflow_bubble() { 118 OverflowBubble* ShelfViewTestAPI::overflow_bubble() {
110 return shelf_view_->overflow_bubble_.get(); 119 return shelf_view_->overflow_bubble_.get();
111 } 120 }
112 121
122 OverflowButton* ShelfViewTestAPI::overflow_button() const {
123 return shelf_view_->overflow_button_;
124 }
125
113 ShelfTooltipManager* ShelfViewTestAPI::tooltip_manager() { 126 ShelfTooltipManager* ShelfViewTestAPI::tooltip_manager() {
114 return &shelf_view_->tooltip_; 127 return &shelf_view_->tooltip_;
115 } 128 }
116 129
117 gfx::Size ShelfViewTestAPI::GetPreferredSize() { 130 gfx::Size ShelfViewTestAPI::GetPreferredSize() {
118 return shelf_view_->GetPreferredSize(); 131 return shelf_view_->GetPreferredSize();
119 } 132 }
120 133
121 int ShelfViewTestAPI::GetButtonSize() { 134 int ShelfViewTestAPI::GetButtonSize() {
122 return GetShelfConstant(SHELF_BUTTON_SIZE); 135 return GetShelfConstant(SHELF_BUTTON_SIZE);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return shelf_view_->dragged_off_from_overflow_to_shelf_; 170 return shelf_view_->dragged_off_from_overflow_to_shelf_;
158 } 171 }
159 172
160 ShelfButtonPressedMetricTracker* 173 ShelfButtonPressedMetricTracker*
161 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() { 174 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() {
162 return &(shelf_view_->shelf_button_pressed_metric_tracker_); 175 return &(shelf_view_->shelf_button_pressed_metric_tracker_);
163 } 176 }
164 177
165 } // namespace test 178 } // namespace test
166 } // namespace ash 179 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698