diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 04:28:44 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 04:28:44 +0000 |
commit | 70e0121ea222a1f680b7f1800aa1d7ba6a950c02 (patch) | |
tree | 1364a04f59c5ba3537940f4e2d5149706f8904f0 /ash/launcher/launcher_model.cc | |
parent | b982402ab573d3796f50b73f411bdb8248b6a04e (diff) | |
download | chromium_src-70e0121ea222a1f680b7f1800aa1d7ba6a950c02.zip chromium_src-70e0121ea222a1f680b7f1800aa1d7ba6a950c02.tar.gz chromium_src-70e0121ea222a1f680b7f1800aa1d7ba6a950c02.tar.bz2 |
Revert 117581 - Removes support for multiple images from launcher. Doesn't look like
we're going to use it, so I'm nuking it. This also fixes the bug where
we would only even show one tab in the launcher even though the window
had more than one.
BUG=none
TEST=none
R=ben@chromium.org
Review URL: http://codereview.chromium.org/9139077
TBR=sky@chromium.org
Review URL: http://codereview.chromium.org/9123028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher/launcher_model.cc')
-rw-r--r-- | ash/launcher/launcher_model.cc | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/ash/launcher/launcher_model.cc b/ash/launcher/launcher_model.cc index c1778fa..9f5c659 100644 --- a/ash/launcher/launcher_model.cc +++ b/ash/launcher/launcher_model.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -39,20 +39,26 @@ void LauncherModel::Move(int index, int target_index) { LauncherItemMoved(index, target_index)); } -void LauncherModel::Set(int index, const LauncherItem& item) { +void LauncherModel::SetTabbedImages(int index, + const LauncherTabbedImages& images) { DCHECK(index >= 0 && index < item_count()); - LauncherItemType type = items_[index].type; - aura::Window* window = items_[index].window; - items_[index] = item; - items_[index].type = type; - items_[index].window = window; + DCHECK_EQ(TYPE_TABBED, items_[index].type); + items_[index].tab_images = images; FOR_EACH_OBSERVER(LauncherModelObserver, observers_, - LauncherItemChanged(index)); + LauncherItemImagesChanged(index)); +} + +void LauncherModel::SetAppImage(int index, const SkBitmap& image) { + DCHECK(index >= 0 && index < item_count()); + DCHECK_EQ(TYPE_APP, items_[index].type); + items_[index].app_image = image; + FOR_EACH_OBSERVER(LauncherModelObserver, observers_, + LauncherItemImagesChanged(index)); } void LauncherModel::SetPendingUpdate(int index) { FOR_EACH_OBSERVER(LauncherModelObserver, observers_, - LauncherItemWillChange(index)); + LauncherItemImagesWillChange(index)); } int LauncherModel::ItemIndexByWindow(aura::Window* window) { |