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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 5697005: Change SimpleMenuModel on OSX to support dynamic icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update after merge Created 10 years 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 | « chrome/browser/ui/views/frame/browser_view.h ('k') | views/controls/menu/native_menu_win.cc » ('j') | 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) 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/views/frame/browser_view.h" 5 #include "chrome/browser/views/frame/browser_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 bool BrowserView::IsCommandIdEnabled(int command_id) const { 1520 bool BrowserView::IsCommandIdEnabled(int command_id) const {
1521 return browser_->command_updater()->IsCommandEnabled(command_id); 1521 return browser_->command_updater()->IsCommandEnabled(command_id);
1522 } 1522 }
1523 1523
1524 bool BrowserView::GetAcceleratorForCommandId(int command_id, 1524 bool BrowserView::GetAcceleratorForCommandId(int command_id,
1525 menus::Accelerator* accelerator) { 1525 menus::Accelerator* accelerator) {
1526 // Let's let the ToolbarView own the canonical implementation of this method. 1526 // Let's let the ToolbarView own the canonical implementation of this method.
1527 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator); 1527 return toolbar_->GetAcceleratorForCommandId(command_id, accelerator);
1528 } 1528 }
1529 1529
1530 bool BrowserView::IsLabelForCommandIdDynamic(int command_id) const { 1530 bool BrowserView::IsItemForCommandIdDynamic(int command_id) const {
1531 return command_id == IDC_RESTORE_TAB; 1531 return command_id == IDC_RESTORE_TAB;
1532 } 1532 }
1533 1533
1534 string16 BrowserView::GetLabelForCommandId(int command_id) const { 1534 string16 BrowserView::GetLabelForCommandId(int command_id) const {
1535 DCHECK(command_id == IDC_RESTORE_TAB); 1535 DCHECK(command_id == IDC_RESTORE_TAB);
1536 1536
1537 int string_id = IDS_RESTORE_TAB; 1537 int string_id = IDS_RESTORE_TAB;
1538 if (IsCommandIdEnabled(command_id)) { 1538 if (IsCommandIdEnabled(command_id)) {
1539 TabRestoreService* trs = browser_->profile()->GetTabRestoreService(); 1539 TabRestoreService* trs = browser_->profile()->GetTabRestoreService();
1540 if (trs && trs->entries().front()->type == TabRestoreService::WINDOW) 1540 if (trs && trs->entries().front()->type == TabRestoreService::WINDOW)
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); 2510 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME));
2511 2511
2512 return view; 2512 return view;
2513 } 2513 }
2514 #endif 2514 #endif
2515 2515
2516 // static 2516 // static
2517 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2517 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2518 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2518 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2519 } 2519 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698