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

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

Issue 229453005: Shelf Cleanup AlternateShelfLayout P1 Attempt 3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | ash/wm/app_list_controller.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 #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_model.h" 10 #include "ash/shelf/shelf_model.h"
10 #include "ash/shelf/shelf_view.h" 11 #include "ash/shelf/shelf_view.h"
11 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
12 #include "ui/views/animation/bounds_animator.h" 13 #include "ui/views/animation/bounds_animator.h"
13 #include "ui/views/view_model.h" 14 #include "ui/views/view_model.h"
14 15
15 namespace { 16 namespace {
16 17
17 // A class used to wait for animations. 18 // A class used to wait for animations.
18 class TestAPIAnimationObserver : public views::BoundsAnimatorObserver { 19 class TestAPIAnimationObserver : public views::BoundsAnimatorObserver {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 OverflowBubble* ShelfViewTestAPI::overflow_bubble() { 101 OverflowBubble* ShelfViewTestAPI::overflow_bubble() {
101 return shelf_view_->overflow_bubble_.get(); 102 return shelf_view_->overflow_bubble_.get();
102 } 103 }
103 104
104 gfx::Size ShelfViewTestAPI::GetPreferredSize() { 105 gfx::Size ShelfViewTestAPI::GetPreferredSize() {
105 return shelf_view_->GetPreferredSize(); 106 return shelf_view_->GetPreferredSize();
106 } 107 }
107 108
108 int ShelfViewTestAPI::GetButtonSize() { 109 int ShelfViewTestAPI::GetButtonSize() {
109 return shelf_view_->GetButtonSize(); 110 return kShelfButtonSize;
110 } 111 }
111 112
112 int ShelfViewTestAPI::GetButtonSpacing() { 113 int ShelfViewTestAPI::GetButtonSpacing() {
113 return shelf_view_->GetButtonSpacing(); 114 return kShelfButtonSpacing;
114 } 115 }
115 116
116 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, 117 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea,
117 ShelfItemType typeb) const { 118 ShelfItemType typeb) const {
118 return shelf_view_->SameDragType(typea, typeb); 119 return shelf_view_->SameDragType(typea, typeb);
119 } 120 }
120 121
121 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { 122 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) {
122 shelf_view_->delegate_ = delegate; 123 shelf_view_->delegate_ = delegate;
123 } 124 }
124 125
125 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { 126 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() {
126 return shelf_view_->GetBoundsForDragInsertInScreen(); 127 return shelf_view_->GetBoundsForDragInsertInScreen();
127 } 128 }
128 129
129 bool ShelfViewTestAPI::IsRippedOffFromShelf() { 130 bool ShelfViewTestAPI::IsRippedOffFromShelf() {
130 return shelf_view_->dragged_off_shelf_; 131 return shelf_view_->dragged_off_shelf_;
131 } 132 }
132 133
133 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { 134 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() {
134 return shelf_view_->dragged_off_from_overflow_to_shelf_; 135 return shelf_view_->dragged_off_from_overflow_to_shelf_;
135 } 136 }
136 137
137 } // namespace test 138 } // namespace test
138 } // namespace ash 139 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | ash/wm/app_list_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698