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

Side by Side Diff: ui/app_list/app_list_item_model.cc

Issue 14533006: Drag and drop between app list and launcher - First patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
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/app_list_item_model.h" 5 #include "ui/app_list/app_list_item_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/app_list/app_list_item_model_observer.h" 8 #include "ui/app_list/app_list_item_model_observer.h"
9 9
10 namespace app_list { 10 namespace app_list {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void AppListItemModel::SetPercentDownloaded(int percent_downloaded) { 55 void AppListItemModel::SetPercentDownloaded(int percent_downloaded) {
56 if (percent_downloaded_ == percent_downloaded) 56 if (percent_downloaded_ == percent_downloaded)
57 return; 57 return;
58 58
59 percent_downloaded_ = percent_downloaded; 59 percent_downloaded_ = percent_downloaded;
60 FOR_EACH_OBSERVER(AppListItemModelObserver, 60 FOR_EACH_OBSERVER(AppListItemModelObserver,
61 observers_, 61 observers_,
62 ItemPercentDownloadedChanged()); 62 ItemPercentDownloadedChanged());
63 } 63 }
64 64
65 void AppListItemModel::SetAppId(const std::string& app_id) {
66 app_id_ = app_id;
67 }
68
65 void AppListItemModel::AddObserver(AppListItemModelObserver* observer) { 69 void AppListItemModel::AddObserver(AppListItemModelObserver* observer) {
66 observers_.AddObserver(observer); 70 observers_.AddObserver(observer);
67 } 71 }
68 72
69 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) { 73 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) {
70 observers_.RemoveObserver(observer); 74 observers_.RemoveObserver(observer);
71 } 75 }
72 76
73 ui::MenuModel* AppListItemModel::GetContextMenuModel() { 77 ui::MenuModel* AppListItemModel::GetContextMenuModel() {
74 return NULL; 78 return NULL;
75 } 79 }
76 80
77 } // namespace app_list 81 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698