| OLD | NEW |
| 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 "chrome/browser/status_icons/status_icon.h" | 5 #include "chrome/browser/status_icons/status_icon.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" |
| 7 #include "chrome/browser/status_icons/status_icon_observer.h" | 8 #include "chrome/browser/status_icons/status_icon_observer.h" |
| 8 | 9 |
| 9 StatusIcon::StatusIcon() { | 10 StatusIcon::StatusIcon() { |
| 10 } | 11 } |
| 11 | 12 |
| 12 StatusIcon::~StatusIcon() { | 13 StatusIcon::~StatusIcon() { |
| 13 } | 14 } |
| 14 | 15 |
| 15 void StatusIcon::AddObserver(StatusIconObserver* observer) { | 16 void StatusIcon::AddObserver(StatusIconObserver* observer) { |
| 16 observers_.AddObserver(observer); | 17 observers_.AddObserver(observer); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 36 | 37 |
| 37 void StatusIcon::ForceVisible() {} | 38 void StatusIcon::ForceVisible() {} |
| 38 | 39 |
| 39 void StatusIcon::SetContextMenu(scoped_ptr<StatusIconMenuModel> menu) { | 40 void StatusIcon::SetContextMenu(scoped_ptr<StatusIconMenuModel> menu) { |
| 40 // The UI may been showing a menu for the current model, don't destroy it | 41 // The UI may been showing a menu for the current model, don't destroy it |
| 41 // until we've notified the UI of the change. | 42 // until we've notified the UI of the change. |
| 42 scoped_ptr<StatusIconMenuModel> old_menu = context_menu_contents_.Pass(); | 43 scoped_ptr<StatusIconMenuModel> old_menu = context_menu_contents_.Pass(); |
| 43 context_menu_contents_ = menu.Pass(); | 44 context_menu_contents_ = menu.Pass(); |
| 44 UpdatePlatformContextMenu(context_menu_contents_.get()); | 45 UpdatePlatformContextMenu(context_menu_contents_.get()); |
| 45 } | 46 } |
| OLD | NEW |