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 "chrome/browser/status_icons/status_icon_observer.h" | 7 #include "chrome/browser/status_icons/status_icon_observer.h" |
8 | 8 |
9 StatusIcon::StatusIcon() { | 9 StatusIcon::StatusIcon() { |
10 } | 10 } |
(...skipping 16 matching lines...) Expand all Loading... |
27 void StatusIcon::DispatchClickEvent() { | 27 void StatusIcon::DispatchClickEvent() { |
28 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnStatusIconClicked()); | 28 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnStatusIconClicked()); |
29 } | 29 } |
30 | 30 |
31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
32 void StatusIcon::DispatchBalloonClickEvent() { | 32 void StatusIcon::DispatchBalloonClickEvent() { |
33 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnBalloonClicked()); | 33 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnBalloonClicked()); |
34 } | 34 } |
35 #endif | 35 #endif |
36 | 36 |
37 void StatusIcon::ForceVisible() {} | |
38 | |
39 void StatusIcon::SetContextMenu(scoped_ptr<StatusIconMenuModel> menu) { | 37 void StatusIcon::SetContextMenu(scoped_ptr<StatusIconMenuModel> menu) { |
40 // The UI may been showing a menu for the current model, don't destroy it | 38 // 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. | 39 // until we've notified the UI of the change. |
42 scoped_ptr<StatusIconMenuModel> old_menu = context_menu_contents_.Pass(); | 40 scoped_ptr<StatusIconMenuModel> old_menu = context_menu_contents_.Pass(); |
43 context_menu_contents_ = menu.Pass(); | 41 context_menu_contents_ = menu.Pass(); |
44 UpdatePlatformContextMenu(context_menu_contents_.get()); | 42 UpdatePlatformContextMenu(context_menu_contents_.get()); |
45 } | 43 } |
OLD | NEW |