OLD | NEW |
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/shelf/overflow_button.h" | 7 #include "ash/shelf/overflow_button.h" |
8 #include "ash/shelf/shelf_button.h" | 8 #include "ash/shelf/shelf_button.h" |
9 #include "ash/shelf/shelf_constants.h" | 9 #include "ash/shelf/shelf_constants.h" |
10 #include "ash/shelf/shelf_model.h" | 10 #include "ash/shelf/shelf_model.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 int ShelfViewTestAPI::GetButtonSpacing() { | 112 int ShelfViewTestAPI::GetButtonSpacing() { |
113 return kShelfButtonSpacing; | 113 return kShelfButtonSpacing; |
114 } | 114 } |
115 | 115 |
116 void ShelfViewTestAPI::ButtonPressed(views::Button* sender, | 116 void ShelfViewTestAPI::ButtonPressed(views::Button* sender, |
117 const ui::Event& event) { | 117 const ui::Event& event) { |
118 return shelf_view_->ButtonPressed(sender, event); | 118 return shelf_view_->ButtonPressed(sender, event); |
119 } | 119 } |
120 | 120 |
| 121 void ShelfViewTestAPI::RecordIconActivatedSource(const ui::Event& event) { |
| 122 shelf_view_->RecordIconActivatedSource(event); |
| 123 } |
| 124 |
| 125 void ShelfViewTestAPI::RecordIconActivatedAction( |
| 126 ShelfItemDelegate::PerformedAction performed_action) { |
| 127 shelf_view_->RecordIconActivatedAction(performed_action); |
| 128 } |
| 129 |
121 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, | 130 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, |
122 ShelfItemType typeb) const { | 131 ShelfItemType typeb) const { |
123 return shelf_view_->SameDragType(typea, typeb); | 132 return shelf_view_->SameDragType(typea, typeb); |
124 } | 133 } |
125 | 134 |
126 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { | 135 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { |
127 shelf_view_->delegate_ = delegate; | 136 shelf_view_->delegate_ = delegate; |
128 } | 137 } |
129 | 138 |
130 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { | 139 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { |
131 return shelf_view_->GetBoundsForDragInsertInScreen(); | 140 return shelf_view_->GetBoundsForDragInsertInScreen(); |
132 } | 141 } |
133 | 142 |
134 bool ShelfViewTestAPI::IsRippedOffFromShelf() { | 143 bool ShelfViewTestAPI::IsRippedOffFromShelf() { |
135 return shelf_view_->dragged_off_shelf_; | 144 return shelf_view_->dragged_off_shelf_; |
136 } | 145 } |
137 | 146 |
138 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { | 147 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { |
139 return shelf_view_->dragged_off_from_overflow_to_shelf_; | 148 return shelf_view_->dragged_off_from_overflow_to_shelf_; |
140 } | 149 } |
141 | 150 |
142 } // namespace test | 151 } // namespace test |
143 } // namespace ash | 152 } // namespace ash |
OLD | NEW |