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

Side by Side Diff: chrome/browser/status_icons/status_icon.cc

Issue 18334003: Linux status icon for Ubuntu Unity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: file restored Created 7 years, 5 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
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 "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 #include "ui/base/models/menu_model.h" 8 #include "ui/base/models/menu_model.h"
9 9
10 StatusIcon::StatusIcon() { 10 StatusIcon::StatusIcon() {
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 bool StatusIcon::HasObservers() const { 24 bool StatusIcon::HasObservers() const {
25 return observers_.size() > 0; 25 return observers_.size() > 0;
26 } 26 }
27 27
28 void StatusIcon::DispatchClickEvent() { 28 void StatusIcon::DispatchClickEvent() {
29 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnStatusIconClicked()); 29 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnStatusIconClicked());
30 } 30 }
31 31
32 void StatusIcon::SetClickActionLabel(const string16& label) {
33 }
34
32 #if defined(OS_WIN) 35 #if defined(OS_WIN)
33 void StatusIcon::DispatchBalloonClickEvent() { 36 void StatusIcon::DispatchBalloonClickEvent() {
34 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnBalloonClicked()); 37 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnBalloonClicked());
35 } 38 }
36 #endif 39 #endif
37 40
38 void StatusIcon::SetContextMenu(ui::MenuModel* menu) { 41 void StatusIcon::SetContextMenu(ui::MenuModel* menu) {
39 // The UI may been showing a menu for the current model, don't destroy it 42 // The UI may been showing a menu for the current model, don't destroy it
40 // until we've notified the UI of the change. 43 // until we've notified the UI of the change.
41 scoped_ptr<ui::MenuModel> old_menu = context_menu_contents_.Pass(); 44 scoped_ptr<ui::MenuModel> old_menu = context_menu_contents_.Pass();
42 context_menu_contents_.reset(menu); 45 context_menu_contents_.reset(menu);
43 UpdatePlatformContextMenu(menu); 46 UpdatePlatformContextMenu(menu);
44 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698