| 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 "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "ui/app_list/app_list_constants.h" | 8 #include "ui/app_list/app_list_constants.h" |
| 9 #include "ui/app_list/app_list_model.h" | 9 #include "ui/app_list/app_list_model.h" |
| 10 #include "ui/app_list/app_list_view_delegate.h" | 10 #include "ui/app_list/app_list_view_delegate.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); | 121 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); |
| 122 SizeToContents(); // Recalcuates with new border. | 122 SizeToContents(); // Recalcuates with new border. |
| 123 GetBubbleFrameView()->SchedulePaint(); | 123 GetBubbleFrameView()->SchedulePaint(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { | 126 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { |
| 127 set_anchor_rect(gfx::Rect(anchor_point, gfx::Size())); | 127 set_anchor_rect(gfx::Rect(anchor_point, gfx::Size())); |
| 128 SizeToContents(); // Repositions view relative to the anchor. | 128 SizeToContents(); // Repositions view relative to the anchor. |
| 129 } | 129 } |
| 130 | 130 |
| 131 void AppListView::SetDragAndDropHostOfCurrentAppList( |
| 132 app_list::ApplicationDragAndDropHost* drag_and_drop_host) { |
| 133 CHECK(app_list_main_view_); |
| 134 app_list_main_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host); |
| 135 } |
| 136 |
| 131 void AppListView::ShowWhenReady() { | 137 void AppListView::ShowWhenReady() { |
| 132 app_list_main_view_->ShowAppListWhenReady(); | 138 app_list_main_view_->ShowAppListWhenReady(); |
| 133 } | 139 } |
| 134 | 140 |
| 135 void AppListView::Close() { | 141 void AppListView::Close() { |
| 136 app_list_main_view_->Close(); | 142 app_list_main_view_->Close(); |
| 137 | 143 app_list_main_view_ = NULL; |
| 138 if (delegate_) | 144 if (delegate_) |
| 139 delegate_->Dismiss(); | 145 delegate_->Dismiss(); |
| 140 else | 146 else |
| 141 GetWidget()->Close(); | 147 GetWidget()->Close(); |
| 142 } | 148 } |
| 143 | 149 |
| 144 void AppListView::UpdateBounds() { | 150 void AppListView::UpdateBounds() { |
| 145 SizeToContents(); | 151 SizeToContents(); |
| 146 } | 152 } |
| 147 | 153 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 236 |
| 231 void AppListView::OnSigninSuccess() { | 237 void AppListView::OnSigninSuccess() { |
| 232 OnSigninStatusChanged(); | 238 OnSigninStatusChanged(); |
| 233 } | 239 } |
| 234 | 240 |
| 235 SigninDelegate* AppListView::GetSigninDelegate() { | 241 SigninDelegate* AppListView::GetSigninDelegate() { |
| 236 return delegate_ ? delegate_->GetSigninDelegate() : NULL; | 242 return delegate_ ? delegate_->GetSigninDelegate() : NULL; |
| 237 } | 243 } |
| 238 | 244 |
| 239 } // namespace app_list | 245 } // namespace app_list |
| OLD | NEW |