Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / status_icons / status_tray.cc
blob0cfe61814aec681e60e2f9096f50b44bea72e0d1
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
3 // found in the LICENSE file.
5 #include "chrome/browser/status_icons/status_tray.h"
7 #include <algorithm>
9 #include "chrome/browser/status_icons/status_icon.h"
11 StatusTray::~StatusTray() {
14 StatusIcon* StatusTray::CreateStatusIcon(StatusIconType type,
15 const gfx::ImageSkia& image,
16 const base::string16& tool_tip) {
17 StatusIcon* icon = CreatePlatformStatusIcon(type, image, tool_tip);
18 if (icon)
19 status_icons_.push_back(icon);
20 return icon;
23 void StatusTray::RemoveStatusIcon(StatusIcon* icon) {
24 StatusIcons::iterator i(
25 std::find(status_icons_.begin(), status_icons_.end(), icon));
27 if (i == status_icons_.end()) {
28 NOTREACHED();
29 return;
32 status_icons_.erase(i);
35 StatusTray::StatusTray() {