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

Side by Side Diff: ui/app_list/views/all_apps_tile_item_view.cc

Issue 947903002: Change ContentsView::SetActivePage to use States rather than indexes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more_rebase Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/all_apps_tile_item_view.h" 5 #include "ui/app_list/views/all_apps_tile_item_view.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "ui/app_list/app_list_constants.h" 8 #include "ui/app_list/app_list_constants.h"
9 #include "ui/app_list/views/contents_view.h" 9 #include "ui/app_list/views/contents_view.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 14 matching lines...) Expand all
25 25
26 void AllAppsTileItemView::UpdateIcon() { 26 void AllAppsTileItemView::UpdateIcon() {
27 folder_image_.UpdateIcon(); 27 folder_image_.UpdateIcon();
28 } 28 }
29 29
30 void AllAppsTileItemView::ButtonPressed(views::Button* sender, 30 void AllAppsTileItemView::ButtonPressed(views::Button* sender,
31 const ui::Event& event) { 31 const ui::Event& event) {
32 UMA_HISTOGRAM_ENUMERATION(kPageOpenedHistogram, AppListModel::STATE_APPS, 32 UMA_HISTOGRAM_ENUMERATION(kPageOpenedHistogram, AppListModel::STATE_APPS,
33 AppListModel::STATE_LAST); 33 AppListModel::STATE_LAST);
34 34
35 contents_view_->SetActivePage( 35 contents_view_->SetActiveState(AppListModel::STATE_APPS);
36 contents_view_->GetPageIndexForState(AppListModel::STATE_APPS));
37 } 36 }
38 37
39 void AllAppsTileItemView::OnFolderImageUpdated() { 38 void AllAppsTileItemView::OnFolderImageUpdated() {
40 SetIcon(folder_image_.icon()); 39 SetIcon(folder_image_.icon());
41 } 40 }
42 41
43 } // namespace app_list 42 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_list/app_list_service_ash.cc ('k') | ui/app_list/views/app_list_main_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698