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

Side by Side Diff: chrome/browser/cocoa/status_icons/status_icon_mac.mm

Issue 3189003: Added support for context menus to status icons. (Closed)
Patch Set: Final version. Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/status_icons/status_icon_mac.h" 5 #include "chrome/browser/cocoa/status_icons/status_icon_mac.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "skia/ext/skia_utils_mac.h" 9 #include "skia/ext/skia_utils_mac.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (!bitmap.isNull()) { 68 if (!bitmap.isNull()) {
69 NSImage* image = gfx::SkBitmapToNSImage(bitmap); 69 NSImage* image = gfx::SkBitmapToNSImage(bitmap);
70 if (image) 70 if (image)
71 [item() setAlternateImage:image]; 71 [item() setAlternateImage:image];
72 } 72 }
73 } 73 }
74 74
75 void StatusIconMac::SetToolTip(const string16& tool_tip) { 75 void StatusIconMac::SetToolTip(const string16& tool_tip) {
76 [item() setToolTip:base::SysUTF16ToNSString(tool_tip)]; 76 [item() setToolTip:base::SysUTF16ToNSString(tool_tip)];
77 } 77 }
78
79 void StatusIconMac::ResetContextMenu(menus::MenuModel* menu) {
80 // TODO(atwilson): Add support for context menus for Mac when actually needed
81 // (not yet used by anything) - http://crbug.com/37375.
82 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/status_icons/status_icon_mac.h ('k') | chrome/browser/gtk/status_icons/status_icon_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698