Chromium Code Reviews| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); | 114 GetBubbleFrameView()->bubble_border()->set_arrow(arrow); |
| 115 SizeToContents(); // Recalcuates with new border. | 115 SizeToContents(); // Recalcuates with new border. |
| 116 GetBubbleFrameView()->SchedulePaint(); | 116 GetBubbleFrameView()->SchedulePaint(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { | 119 void AppListView::SetAnchorPoint(const gfx::Point& anchor_point) { |
| 120 set_anchor_rect(gfx::Rect(anchor_point, gfx::Size())); | 120 set_anchor_rect(gfx::Rect(anchor_point, gfx::Size())); |
| 121 SizeToContents(); // Repositions view relative to the anchor. | 121 SizeToContents(); // Repositions view relative to the anchor. |
| 122 } | 122 } |
| 123 | 123 |
| 124 void AppListView::SetAppListDnDHost(app_list::ApplicationDnDHost* dnd_host) { | |
| 125 DCHECK(app_list_main_view_); | |
|
James Cook
2013/04/29 22:08:29
I like asserts!
Mr4D (OOO till 08-26)
2013/04/30 16:59:01
Okay, converted into a CHECK since this should not
| |
| 126 app_list_main_view_->SetAppListDnDHost(dnd_host); | |
| 127 } | |
| 128 | |
| 124 void AppListView::ShowWhenReady() { | 129 void AppListView::ShowWhenReady() { |
| 125 app_list_main_view_->ShowAppListWhenReady(); | 130 app_list_main_view_->ShowAppListWhenReady(); |
| 126 } | 131 } |
| 127 | 132 |
| 128 void AppListView::Close() { | 133 void AppListView::Close() { |
| 129 app_list_main_view_->Close(); | 134 app_list_main_view_->Close(); |
| 130 | 135 app_list_main_view_ = NULL; |
| 131 if (delegate_.get()) | 136 if (delegate_.get()) |
| 132 delegate_->Dismiss(); | 137 delegate_->Dismiss(); |
| 133 else | 138 else |
| 134 GetWidget()->Close(); | 139 GetWidget()->Close(); |
| 135 } | 140 } |
| 136 | 141 |
| 137 void AppListView::UpdateBounds() { | 142 void AppListView::UpdateBounds() { |
| 138 SizeToContents(); | 143 SizeToContents(); |
| 139 } | 144 } |
| 140 | 145 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 | 228 |
| 224 void AppListView::OnSigninSuccess() { | 229 void AppListView::OnSigninSuccess() { |
| 225 OnSigninStatusChanged(); | 230 OnSigninStatusChanged(); |
| 226 } | 231 } |
| 227 | 232 |
| 228 SigninDelegate* AppListView::GetSigninDelegate() { | 233 SigninDelegate* AppListView::GetSigninDelegate() { |
| 229 return delegate_ ? delegate_->GetSigninDelegate() : NULL; | 234 return delegate_ ? delegate_->GetSigninDelegate() : NULL; |
| 230 } | 235 } |
| 231 | 236 |
| 232 } // namespace app_list | 237 } // namespace app_list |
| OLD | NEW |