| 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 SizeToContents(); // Repositions view relative to the anchor. | 121 SizeToContents(); // Repositions view relative to the anchor. |
| 122 } | 122 } |
| 123 | 123 |
| 124 void AppListView::ShowWhenReady() { | 124 void AppListView::ShowWhenReady() { |
| 125 app_list_main_view_->ShowAppListWhenReady(); | 125 app_list_main_view_->ShowAppListWhenReady(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void AppListView::Close() { | 128 void AppListView::Close() { |
| 129 app_list_main_view_->Close(); | 129 app_list_main_view_->Close(); |
| 130 | 130 |
| 131 if (delegate_.get()) | 131 if (delegate_) |
| 132 delegate_->Dismiss(); | 132 delegate_->Dismiss(); |
| 133 else | 133 else |
| 134 GetWidget()->Close(); | 134 GetWidget()->Close(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void AppListView::UpdateBounds() { | 137 void AppListView::UpdateBounds() { |
| 138 SizeToContents(); | 138 SizeToContents(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 gfx::Size AppListView::GetPreferredSize() { | 141 gfx::Size AppListView::GetPreferredSize() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 156 | 156 |
| 157 signin_view_->SetVisible(needs_signin); | 157 signin_view_->SetVisible(needs_signin); |
| 158 app_list_main_view_->SetVisible(!needs_signin); | 158 app_list_main_view_->SetVisible(!needs_signin); |
| 159 } | 159 } |
| 160 | 160 |
| 161 views::View* AppListView::GetInitiallyFocusedView() { | 161 views::View* AppListView::GetInitiallyFocusedView() { |
| 162 return app_list_main_view_->search_box_view()->search_box(); | 162 return app_list_main_view_->search_box_view()->search_box(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 gfx::ImageSkia AppListView::GetWindowIcon() { | 165 gfx::ImageSkia AppListView::GetWindowIcon() { |
| 166 if (delegate_.get()) | 166 if (delegate_) |
| 167 return delegate_->GetWindowIcon(); | 167 return delegate_->GetWindowIcon(); |
| 168 | 168 |
| 169 return gfx::ImageSkia(); | 169 return gfx::ImageSkia(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool AppListView::WidgetHasHitTestMask() const { | 172 bool AppListView::WidgetHasHitTestMask() const { |
| 173 return true; | 173 return true; |
| 174 } | 174 } |
| 175 | 175 |
| 176 void AppListView::GetWidgetHitTestMask(gfx::Path* mask) const { | 176 void AppListView::GetWidgetHitTestMask(gfx::Path* mask) const { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 void AppListView::OnSigninSuccess() { | 224 void AppListView::OnSigninSuccess() { |
| 225 OnSigninStatusChanged(); | 225 OnSigninStatusChanged(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 SigninDelegate* AppListView::GetSigninDelegate() { | 228 SigninDelegate* AppListView::GetSigninDelegate() { |
| 229 return delegate_ ? delegate_->GetSigninDelegate() : NULL; | 229 return delegate_ ? delegate_->GetSigninDelegate() : NULL; |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace app_list | 232 } // namespace app_list |
| OLD | NEW |