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

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();
73 } 78 }
74 79
75 const gfx::Rect& ShelfViewTestAPI::GetBoundsByIndex(int index) { 80 const gfx::Rect& ShelfViewTestAPI::GetBoundsByIndex(int index) {
76 return shelf_view_->view_model_->view_at(index)->bounds(); 81 return shelf_view_->view_model_->view_at(index)->bounds();
77 } 82 }
78 83
79 const gfx::Rect& ShelfViewTestAPI::GetIdealBoundsByIndex(int index) { 84 const gfx::Rect& ShelfViewTestAPI::GetIdealBoundsByIndex(int index) {
80 return shelf_view_->view_model_->ideal_bounds(index); 85 return shelf_view_->view_model_->ideal_bounds(index);
81 } 86 }
82 87
(...skipping 20 matching lines...) Expand all
103 if (!shelf_view_->launcher_menu_runner_) 108 if (!shelf_view_->launcher_menu_runner_)
104 return; 109 return;
105 110
106 shelf_view_->launcher_menu_runner_->Cancel(); 111 shelf_view_->launcher_menu_runner_->Cancel();
107 } 112 }
108 113
109 OverflowBubble* ShelfViewTestAPI::overflow_bubble() { 114 OverflowBubble* ShelfViewTestAPI::overflow_bubble() {
110 return shelf_view_->overflow_bubble_.get(); 115 return shelf_view_->overflow_bubble_.get();
111 } 116 }
112 117
118 OverflowButton* ShelfViewTestAPI::overflow_button() const {
119 return shelf_view_->overflow_button_;
120 }
121
113 ShelfTooltipManager* ShelfViewTestAPI::tooltip_manager() { 122 ShelfTooltipManager* ShelfViewTestAPI::tooltip_manager() {
114 return &shelf_view_->tooltip_; 123 return &shelf_view_->tooltip_;
115 } 124 }
116 125
117 gfx::Size ShelfViewTestAPI::GetPreferredSize() { 126 gfx::Size ShelfViewTestAPI::GetPreferredSize() {
118 return shelf_view_->GetPreferredSize(); 127 return shelf_view_->GetPreferredSize();
119 } 128 }
120 129
121 int ShelfViewTestAPI::GetButtonSize() { 130 int ShelfViewTestAPI::GetButtonSize() {
122 return GetShelfConstant(SHELF_BUTTON_SIZE); 131 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_; 166 return shelf_view_->dragged_off_from_overflow_to_shelf_;
158 } 167 }
159 168
160 ShelfButtonPressedMetricTracker* 169 ShelfButtonPressedMetricTracker*
161 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() { 170 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() {
162 return &(shelf_view_->shelf_button_pressed_metric_tracker_); 171 return &(shelf_view_->shelf_button_pressed_metric_tracker_);
163 } 172 }
164 173
165 } // namespace test 174 } // namespace test
166 } // namespace ash 175 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698