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

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

Issue 17286015: Adds a first-run balloon to the Windows notification center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dimich comments. Created 7 years, 6 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 | Annotate | Revision Log
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 #if defined(OS_WIN)
33 void StatusIcon::DispatchBalloonClickEvent() {
34 FOR_EACH_OBSERVER(StatusIconObserver, observers_, OnBalloonClicked());
35 }
36 #endif
37
32 void StatusIcon::SetContextMenu(ui::MenuModel* menu) { 38 void StatusIcon::SetContextMenu(ui::MenuModel* menu) {
33 // The UI may been showing a menu for the current model, don't destroy it 39 // The UI may been showing a menu for the current model, don't destroy it
34 // until we've notified the UI of the change. 40 // until we've notified the UI of the change.
35 scoped_ptr<ui::MenuModel> old_menu = context_menu_contents_.Pass(); 41 scoped_ptr<ui::MenuModel> old_menu = context_menu_contents_.Pass();
36 context_menu_contents_.reset(menu); 42 context_menu_contents_.reset(menu);
37 UpdatePlatformContextMenu(menu); 43 UpdatePlatformContextMenu(menu);
38 } 44 }
OLDNEW
« no previous file with comments | « chrome/browser/status_icons/status_icon.h ('k') | chrome/browser/status_icons/status_icon_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698