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

Side by Side Diff: ui/views/controls/menu/menu_win.cc

Issue 10824359: Remove ImageSkia::empty and ImageSkia::extractSubset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/controls/menu/menu_win.h" 5 #include "ui/views/controls/menu/menu_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 394 }
395 395
396 void MenuWin::AddMenuItemInternal(int index, 396 void MenuWin::AddMenuItemInternal(int index,
397 int item_id, 397 int item_id,
398 const string16& label, 398 const string16& label,
399 const gfx::ImageSkia& icon, 399 const gfx::ImageSkia& icon,
400 HMENU submenu, 400 HMENU submenu,
401 MenuItemType type) { 401 MenuItemType type) {
402 DCHECK(type != SEPARATOR) << "Call AddSeparator instead!"; 402 DCHECK(type != SEPARATOR) << "Call AddSeparator instead!";
403 403
404 if (!owner_draw_ && !icon.empty()) 404 if (!owner_draw_ && !icon.isNull())
405 owner_draw_ = true; 405 owner_draw_ = true;
406 406
407 if (label.empty() && !delegate()) { 407 if (label.empty() && !delegate()) {
408 // No label and no delegate; don't add an empty menu. 408 // No label and no delegate; don't add an empty menu.
409 // It appears under some circumstance we're getting an empty label 409 // It appears under some circumstance we're getting an empty label
410 // (l10n_util::GetStringUTF16(IDS_TASK_MANAGER) returns ""). This shouldn't 410 // (l10n_util::GetStringUTF16(IDS_TASK_MANAGER) returns ""). This shouldn't
411 // happen, but I'm working over the crash here. 411 // happen, but I'm working over the crash here.
412 NOTREACHED(); 412 NOTREACHED();
413 return; 413 return;
414 } 414 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 break; 565 break;
566 566
567 default: 567 default:
568 NOTREACHED(); 568 NOTREACHED();
569 return 0; 569 return 0;
570 } 570 }
571 return align_flags; 571 return align_flags;
572 } 572 }
573 573
574 } // namespace views 574 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698