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

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove binary changes Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index 2d2f5f4bba397ed801de08b945d057f241d4e990..ae4647ff2c3d9ec0da0a148954c0b13a78fde956 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -54,7 +54,7 @@ AppListView::AppListView(AppListViewDelegate* delegate)
app_list_main_view_(NULL),
signin_view_(NULL) {
if (delegate_)
- delegate_->SetModel(model_.get());
+ delegate_->InitModel(model_.get());
model_->AddObserver(this);
}
@@ -146,6 +146,10 @@ void AppListView::OnSigninStatusChanged() {
app_list_main_view_->search_box_view()->InvalidateMenu();
}
+void AppListView::SetProfileByPath(const base::FilePath& profile_path) {
+ delegate_->SetProfileByPath(profile_path);
+}
+
void AppListView::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
}
@@ -188,7 +192,8 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
#endif
signin_view_ = new SigninView(
- GetSigninDelegate(),
+ delegate_ ? delegate_->GetSigninDelegate()
+ : NULL,
app_list_main_view_->GetPreferredSize().width());
AddChildView(signin_view_);
@@ -309,15 +314,11 @@ void AppListView::OnWidgetVisibilityChanged(views::Widget* widget,
Layout();
}
-SigninDelegate* AppListView::GetSigninDelegate() {
- return delegate_ ? delegate_->GetSigninDelegate() : NULL;
-}
-
void AppListView::OnAppListModelSigninStatusChanged() {
OnSigninStatusChanged();
}
-void AppListView::OnAppListModelCurrentUserChanged() {
+void AppListView::OnAppListModelUsersChanged() {
OnSigninStatusChanged();
}
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698