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

Side by Side Diff: ash/launcher/launcher_model.cc

Issue 9649013: Show a different icon in the launcher for incognito windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « no previous file | ash/launcher/launcher_types.h » ('j') | ash/launcher/launcher_types.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/launcher/launcher_model.h" 5 #include "ash/launcher/launcher_model.h"
6 6
7 #include "ash/launcher/launcher_model_observer.h" 7 #include "ash/launcher/launcher_model_observer.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 9
10 namespace ash { 10 namespace ash {
11 11
12 LauncherModel::LauncherModel() : next_id_(1) { 12 LauncherModel::LauncherModel() : next_id_(1) {
13 Add(0, LauncherItem(TYPE_APP_LIST)); 13 Add(0, LauncherItem(TYPE_APP_LIST, false));
14 Add(1, LauncherItem(TYPE_BROWSER_SHORTCUT)); 14 Add(1, LauncherItem(TYPE_BROWSER_SHORTCUT, false));
15 } 15 }
16 16
17 LauncherModel::~LauncherModel() { 17 LauncherModel::~LauncherModel() {
18 } 18 }
19 19
20 void LauncherModel::Add(int index, const LauncherItem& item) { 20 void LauncherModel::Add(int index, const LauncherItem& item) {
21 DCHECK(index >= 0 && index <= item_count()); 21 DCHECK(index >= 0 && index <= item_count());
22 items_.insert(items_.begin() + index, item); 22 items_.insert(items_.begin() + index, item);
23 items_[index].id = next_id_++; 23 items_[index].id = next_id_++;
24 FOR_EACH_OBSERVER(LauncherModelObserver, observers_, 24 FOR_EACH_OBSERVER(LauncherModelObserver, observers_,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void LauncherModel::AddObserver(LauncherModelObserver* observer) { 77 void LauncherModel::AddObserver(LauncherModelObserver* observer) {
78 observers_.AddObserver(observer); 78 observers_.AddObserver(observer);
79 } 79 }
80 80
81 void LauncherModel::RemoveObserver(LauncherModelObserver* observer) { 81 void LauncherModel::RemoveObserver(LauncherModelObserver* observer) {
82 observers_.RemoveObserver(observer); 82 observers_.RemoveObserver(observer);
83 } 83 }
84 84
85 } // namespace ash 85 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_types.h » ('j') | ash/launcher/launcher_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698