| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 | 108 |
| 109 int ShelfViewTestAPI::GetButtonSize() { | 109 int ShelfViewTestAPI::GetButtonSize() { |
| 110 return kShelfButtonSize; | 110 return kShelfButtonSize; |
| 111 } | 111 } |
| 112 | 112 |
| 113 int ShelfViewTestAPI::GetButtonSpacing() { | 113 int ShelfViewTestAPI::GetButtonSpacing() { |
| 114 return kShelfButtonSpacing; | 114 return kShelfButtonSpacing; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void ShelfViewTestAPI::ButtonPressed(views::Button* sender, |
| 118 const ui::Event& event) { |
| 119 return shelf_view_->ButtonPressed(sender, event); |
| 120 } |
| 121 |
| 117 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, | 122 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, |
| 118 ShelfItemType typeb) const { | 123 ShelfItemType typeb) const { |
| 119 return shelf_view_->SameDragType(typea, typeb); | 124 return shelf_view_->SameDragType(typea, typeb); |
| 120 } | 125 } |
| 121 | 126 |
| 122 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { | 127 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { |
| 123 shelf_view_->delegate_ = delegate; | 128 shelf_view_->delegate_ = delegate; |
| 124 } | 129 } |
| 125 | 130 |
| 126 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { | 131 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { |
| 127 return shelf_view_->GetBoundsForDragInsertInScreen(); | 132 return shelf_view_->GetBoundsForDragInsertInScreen(); |
| 128 } | 133 } |
| 129 | 134 |
| 130 bool ShelfViewTestAPI::IsRippedOffFromShelf() { | 135 bool ShelfViewTestAPI::IsRippedOffFromShelf() { |
| 131 return shelf_view_->dragged_off_shelf_; | 136 return shelf_view_->dragged_off_shelf_; |
| 132 } | 137 } |
| 133 | 138 |
| 134 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { | 139 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { |
| 135 return shelf_view_->dragged_off_from_overflow_to_shelf_; | 140 return shelf_view_->dragged_off_from_overflow_to_shelf_; |
| 136 } | 141 } |
| 137 | 142 |
| 138 } // namespace test | 143 } // namespace test |
| 139 } // namespace ash | 144 } // namespace ash |
| OLD | NEW |