| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
| 10 #include "ui/app_list/app_list_model.h" | 10 #include "ui/app_list/app_list_model.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void AppListView::Prerender() { | 172 void AppListView::Prerender() { |
| 173 app_list_main_view_->Prerender(); | 173 app_list_main_view_->Prerender(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void AppListView::OnSigninStatusChanged() { | 176 void AppListView::OnSigninStatusChanged() { |
| 177 const bool needs_signin = | 177 const bool needs_signin = |
| 178 GetSigninDelegate() && GetSigninDelegate()->NeedSignin(); | 178 GetSigninDelegate() && GetSigninDelegate()->NeedSignin(); |
| 179 | 179 |
| 180 signin_view_->SetVisible(needs_signin); | 180 signin_view_->SetVisible(needs_signin); |
| 181 app_list_main_view_->SetVisible(!needs_signin); | 181 app_list_main_view_->SetVisible(!needs_signin); |
| 182 app_list_main_view_->search_box_view()->InvalidateMenu(); |
| 182 } | 183 } |
| 183 | 184 |
| 184 views::View* AppListView::GetInitiallyFocusedView() { | 185 views::View* AppListView::GetInitiallyFocusedView() { |
| 185 return app_list_main_view_->search_box_view()->search_box(); | 186 return app_list_main_view_->search_box_view()->search_box(); |
| 186 } | 187 } |
| 187 | 188 |
| 188 gfx::ImageSkia AppListView::GetWindowIcon() { | 189 gfx::ImageSkia AppListView::GetWindowIcon() { |
| 189 if (delegate_) | 190 if (delegate_) |
| 190 return delegate_->GetWindowIcon(); | 191 return delegate_->GetWindowIcon(); |
| 191 | 192 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 257 |
| 257 void AppListView::OnSigninSuccess() { | 258 void AppListView::OnSigninSuccess() { |
| 258 OnSigninStatusChanged(); | 259 OnSigninStatusChanged(); |
| 259 } | 260 } |
| 260 | 261 |
| 261 SigninDelegate* AppListView::GetSigninDelegate() { | 262 SigninDelegate* AppListView::GetSigninDelegate() { |
| 262 return delegate_ ? delegate_->GetSigninDelegate() : NULL; | 263 return delegate_ ? delegate_->GetSigninDelegate() : NULL; |
| 263 } | 264 } |
| 264 | 265 |
| 265 } // namespace app_list | 266 } // namespace app_list |
| OLD | NEW |