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

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

Issue 9692021: Revert 126256 - Show a different icon in the launcher for incognito windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/launcher/launcher_types.h » ('j') | no next file with comments »
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 LauncherItem app_list; 13 Add(0, LauncherItem(TYPE_APP_LIST));
14 app_list.type = TYPE_APP_LIST; 14 Add(1, LauncherItem(TYPE_BROWSER_SHORTCUT));
15 app_list.is_incognito = false;
16
17 LauncherItem browser_shortcut;
18 browser_shortcut.type = TYPE_BROWSER_SHORTCUT;
19 browser_shortcut.is_incognito = false;
20
21 Add(0, app_list);
22 Add(1, browser_shortcut);
23 } 15 }
24 16
25 LauncherModel::~LauncherModel() { 17 LauncherModel::~LauncherModel() {
26 } 18 }
27 19
28 void LauncherModel::Add(int index, const LauncherItem& item) { 20 void LauncherModel::Add(int index, const LauncherItem& item) {
29 DCHECK(index >= 0 && index <= item_count()); 21 DCHECK(index >= 0 && index <= item_count());
30 items_.insert(items_.begin() + index, item); 22 items_.insert(items_.begin() + index, item);
31 items_[index].id = next_id_++; 23 items_[index].id = next_id_++;
32 FOR_EACH_OBSERVER(LauncherModelObserver, observers_, 24 FOR_EACH_OBSERVER(LauncherModelObserver, observers_,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 76
85 void LauncherModel::AddObserver(LauncherModelObserver* observer) { 77 void LauncherModel::AddObserver(LauncherModelObserver* observer) {
86 observers_.AddObserver(observer); 78 observers_.AddObserver(observer);
87 } 79 }
88 80
89 void LauncherModel::RemoveObserver(LauncherModelObserver* observer) { 81 void LauncherModel::RemoveObserver(LauncherModelObserver* observer) {
90 observers_.RemoveObserver(observer); 82 observers_.RemoveObserver(observer);
91 } 83 }
92 84
93 } // namespace ash 85 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698