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

Side by Side Diff: chrome/browser/ui/views/status_icons/status_icon_win.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/ui/views/status_icons/status_icon_win.h" 5 #include "chrome/browser/ui/views/status_icons/status_icon_win.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/win/metro.h" 8 #include "base/win/metro.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (!SetForegroundWindow(window_)) 56 if (!SetForegroundWindow(window_))
57 return; 57 return;
58 58
59 menu_runner_.reset(new views::MenuRunner(menu_model_)); 59 menu_runner_.reset(new views::MenuRunner(menu_model_));
60 60
61 ignore_result(menu_runner_->RunMenuAt(NULL, NULL, 61 ignore_result(menu_runner_->RunMenuAt(NULL, NULL,
62 gfx::Rect(cursor_pos, gfx::Size()), views::MenuItemView::TOPLEFT, 62 gfx::Rect(cursor_pos, gfx::Size()), views::MenuItemView::TOPLEFT,
63 ui::MENU_SOURCE_MOUSE, views::MenuRunner::HAS_MNEMONICS)); 63 ui::MENU_SOURCE_MOUSE, views::MenuRunner::HAS_MNEMONICS));
64 } 64 }
65 65
66 void StatusIconWin::HandleBalloonClickEvent() {
67 if (HasObservers())
68 DispatchBalloonClickEvent();
69 }
70
66 void StatusIconWin::ResetIcon() { 71 void StatusIconWin::ResetIcon() {
67 NOTIFYICONDATA icon_data; 72 NOTIFYICONDATA icon_data;
68 InitIconData(&icon_data); 73 InitIconData(&icon_data);
69 // Delete any previously existing icon. 74 // Delete any previously existing icon.
70 Shell_NotifyIcon(NIM_DELETE, &icon_data); 75 Shell_NotifyIcon(NIM_DELETE, &icon_data);
71 InitIconData(&icon_data); 76 InitIconData(&icon_data);
72 icon_data.uFlags = NIF_MESSAGE; 77 icon_data.uFlags = NIF_MESSAGE;
73 icon_data.uCallbackMessage = message_id_; 78 icon_data.uCallbackMessage = message_id_;
74 icon_data.hIcon = icon_.Get(); 79 icon_data.hIcon = icon_.Get();
75 // If we have an image, then set the NIF_ICON flag, which tells 80 // If we have an image, then set the NIF_ICON flag, which tells
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 notification("", "", title.c_str(), contents.c_str(), L"", 208 notification("", "", title.c_str(), contents.c_str(), L"",
204 base::IntToString(id_).c_str(), NULL, NULL); 209 base::IntToString(id_).c_str(), NULL, NULL);
205 } 210 }
206 } 211 }
207 212
208 void StatusIconMetro::UpdatePlatformContextMenu(ui::MenuModel* menu) { 213 void StatusIconMetro::UpdatePlatformContextMenu(ui::MenuModel* menu) {
209 DVLOG(1) << __FUNCTION__ 214 DVLOG(1) << __FUNCTION__
210 << " This functionality is not supported in Windows 8 metro"; 215 << " This functionality is not supported in Windows 8 metro";
211 } 216 }
212 217
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/status_icons/status_icon_win.h ('k') | chrome/browser/ui/views/status_icons/status_tray_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698